ElderResearch / gpu_docker

dockerfiles for our dc office gpu development machine
4 stars 2 forks source link

Install cusparse header files into Docker #89

Open tomshafer opened 4 years ago

tomshafer commented 4 years ago

I'm attempting to install detectron to do some prototyping for GRS, but the pip install (in a virtualenv) failes for missing cusparse.h headers. The headers are available but not installed.

Attempt:

(venv) tshafer@9a5494a2eaee:~/Projects/Blackmarker$ python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'

[...]

  /home/tshafer/Projects/Blackmarker/venv/lib/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h:6:10: fatal error: cusparse.h: No such file or directory
   #include <cusparse.h>
            ^~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for detectron2

Looks like the headers are available, just not installed:

(venv) tshafer@9a5494a2eaee:~/Projects/Blackmarker$ apt-cache search cuda
cuda-cusparse-10-0 - CUSPARSE native runtime libraries
...

If you could install them (or teach me how to "fish" rather than just be a support burden) that would be super helpful. Thanks!

tomshafer commented 4 years ago

The Rapids image seems to have cusparse, so I'm in business for now (thanks, Ian!) We might want to update the base Python image, too, to agt-get install:

cuda-cusparse-10-0
cuda-cusparse-dev-10-0

(If I'm correct that we are using CUDA 10.0.)

enmyj commented 4 years ago

@tomshafer - @semperstew is working on a new base image build directly off the CUDA image with conda installed. Hopefully that will be a bit more flexible! https://github.com/ElderResearch/gpu_docker/pull/91

semperstew commented 4 years ago

I have a working image for Python-only at this point. Adding R into the same conda environment is proving to be difficult. It may be easier to create separate images; one for python and one for R. I'm guessing most users are using one or the other in a single session so separate images shouldn't be an issue. Does R have a mature API for tensorflow at this point or is it still relying on reticulate?

tomshafer commented 4 years ago

Looks like it's still reticulate. I don't have a problem with separating Python and R.