Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not handled case: CUDA without CUDA_HOME set #2254

Closed
MiroPsota opened this issue Nov 12, 2020 · 1 comment
Closed

Not handled case: CUDA without CUDA_HOME set #2254

MiroPsota opened this issue Nov 12, 2020 · 1 comment
Labels
contributions welcome welcome contributors enhancement Improvements or good new features

Comments

@MiroPsota
Copy link

MiroPsota commented Nov 12, 2020

When installing torch from pip, from torch.utils.cpp_extension import CUDA_HOME returns None, nevetheless CUDA works just fine.

In detectron2, os.path.isdir(CUDA_HOME) in this line expects CUDA_HOME to be not None.

msg = " - invalid!" if not os.path.isdir(CUDA_HOME) else ""

As a temporary workaround, I'm setting CUDA_HOME=/.

Environment:
As provided script is not working (it uses mentioned code), I'm just listing code to recreate env:

conda create -n detectron2 -y
conda activate detectron2

conda install python=3.8 -y

pip install \
  -f https://download.pytorch.org/whl/torch_stable.html \
  torch==1.7.0+cu101 \
  torchvision==0.8.1+cu101 \
  pycocotools \
  -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.7/index.html \
  detectron2==0.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome welcome contributors enhancement Improvements or good new features
Projects
None yet
Development

No branches or pull requests

3 participants