facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.21k stars 5.45k forks source link

Can't `FORCE_CUDA=1 pip install -e .` detectron2 during docker build on a host without a GPU #962

Closed guy4261 closed 4 years ago

guy4261 commented 4 years ago

Expected results

FORCE_CUDA=1 pip install -e . on the detectron2 repo, when the builder does not have a GPU (but it will be used on an environment with GPU and nvidia-docker2.

Actual results

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:50

If I don't install and run the image without detectron2 on an instance with a GPU, the installation does work and the demo works perfectly.

Detailed steps to reproduce

The relevant part of the Dockerfile:

RUN CUDA_VISIBLE_DEVICES=0 FORCE_CUDA=1 pip install -e /detectron2

System information

guy4261 commented 4 years ago

It's for detectron2 😅