diff --git a/README.md b/README.md index 9760d9bcd451769aace3af583cb2105b0ff0298c..35fa477d0afbc08a7b51731b3b0f6fa0915f139d 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,19 @@ conda activate dinov2 pip install -r requirements.txt ``` +For dense tasks (depth estimation and semantic segmentation), there are additional dependencies (specific versions of `mmcv` and `mmsegmentation`) which are captured in the `extras` dependency specifications: + +*[conda](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html)* **(Recommended)**: + +```shell +conda env create -f conda-extras.yaml +conda activate dinov2-extras +``` + +*[pip](https://pip.pypa.io/en/stable/getting-started/)*: + +pip install -r requirements.txt -r requirements-extras.txt + ## Data preparation ### ImageNet-1k diff --git a/conda-extras.yaml b/conda-extras.yaml new file mode 100644 index 0000000000000000000000000000000000000000..71574c4d32e31c1e134ffb2102daa86a14867bb8 --- /dev/null +++ b/conda-extras.yaml @@ -0,0 +1,24 @@ +name: dinov2-extras +channels: + - defaults + - pytorch + - nvidia + - xformers + - conda-forge +dependencies: + - python=3.9 + - pytorch::pytorch=2.0.0 + - pytorch::pytorch-cuda=11.7.0 + - pytorch::torchvision=0.15.0 + - omegaconf + - torchmetrics=0.10.3 + - fvcore + - iopath + - xformers::xformers=0.0.18 + - pip + - pip: + - git+https://github.com/facebookincubator/submitit + - --extra-index-url https://pypi.nvidia.com + - cuml-cu11 + - mmcv-full==1.5.0 + - mmsegmentation==0.27.0 diff --git a/requirements-extras.txt b/requirements-extras.txt new file mode 100644 index 0000000000000000000000000000000000000000..ac75fb3eace10f58fa6b5bc373f24358394141e5 --- /dev/null +++ b/requirements-extras.txt @@ -0,0 +1,2 @@ +mmcv-full==1.5.0 +mmsegmentation==0.27.0 diff --git a/setup.py b/setup.py index 54f5d5e402cafacf38b2addb07bfd89d7622f13d..daa9d6322fc3a451d2a07038ffdb9eea709e96bf 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,7 @@ def get_package_version() -> str: requirements, extra_indices = get_requirements() version = get_package_version() dev_requirements, _ = get_requirements(HERE / "requirements-dev.txt") +extras_requirements, _ = get_requirements(HERE / "requirements-extras.txt") setup( @@ -66,10 +67,11 @@ setup( "": ["*.yaml"], }, install_requires=requirements, - dependency_links=extra_indices, extras_require={ "dev": dev_requirements, + "extras": extras_requirements, }, + dependency_links=extra_indices, install_package_data=True, license="Apache", license_files=("LICENSE",),