dinov2 icon indicating copy to clipboard operation
dinov2 copied to clipboard

problem with installing mmcv

Open nagitam opened this issue 8 months ago • 7 comments

conda env create -f conda-extras.yaml fails with error message

Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 23.7.4
  latest version: 23.9.0

Please update conda by running

    $ conda update -n base -c conda-forge conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.9.0



Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['/opt/conda/envs/dinov2-extras/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/jovyan/code/dinov2/condaenv.786udvr2.requirements.txt', '--exists-action=b']
Pip subprocess output:
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Collecting git+https://github.com/facebookincubator/submitit (from -r /home/jovyan/code/dinov2/condaenv.786udvr2.requirements.txt (line 1))
  Cloning https://github.com/facebookincubator/submitit to /tmp/pip-req-build-4xumvgau
  Resolved https://github.com/facebookincubator/submitit to commit e8600a2b9e9cbe05751ab433bbaba2ae960d8ac2
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting cuml-cu11 (from -r /home/jovyan/code/dinov2/condaenv.786udvr2.requirements.txt (line 3))
  Using cached https://pypi.nvidia.com/cuml-cu11/cuml_cu11-23.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1081.8 MB)
Collecting mmcv-full==1.5.0 (from -r /home/jovyan/code/dinov2/condaenv.786udvr2.requirements.txt (line 4))
  Using cached mmcv-full-1.5.0.tar.gz (530 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

Pip subprocess error:
  Running command git clone --filter=blob:none --quiet https://github.com/facebookincubator/submitit /tmp/pip-req-build-4xumvgau
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /tmp/pip-install-pa3tzeja/mmcv-full_26c44a3cfd544d1f80c1a675007fd507/setup.py:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        from pkg_resources import DistributionNotFound, get_distribution
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-pa3tzeja/mmcv-full_26c44a3cfd544d1f80c1a675007fd507/setup.py", line 422, in <module>
          ext_modules=get_extensions(),
        File "/tmp/pip-install-pa3tzeja/mmcv-full_26c44a3cfd544d1f80c1a675007fd507/setup.py", line 326, in get_extensions
          ext_ops = extension(
        File "/opt/conda/envs/dinov2-extras/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1048, in CUDAExtension
          library_dirs += library_paths(cuda=True)
        File "/opt/conda/envs/dinov2-extras/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1179, in library_paths
          if (not os.path.exists(_join_cuda_home(lib_dir)) and
        File "/opt/conda/envs/dinov2-extras/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2223, in _join_cuda_home
          raise EnvironmentError('CUDA_HOME environment variable is not set. '
      OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed

I am installing on AWS Sagemaker studio, with a base conda env as attached. cuda is installed via conda.

nagitam avatar Oct 09 '23 06:10 nagitam