Closed ManuelPap closed 2 years ago
You'd need the CUDA SDK installed in the docker (it only uses the CUDA drivers from the host, not the SDK and development stuff). As you're using the PyTorch runtime image it doesn't include the SDK. The devel image (pytorch/pytorch:1.9.0-cuda11.1-cudnn8-devel
) will include it and so should have the environment variable set.
But you're using PyTorch 1.9 which has a native Mish so there's no need for this implementation.
Hello !
I am new to Dockers and I would like to install mish_cuda with a docker. I pull the image pytorch/pytorch:1.9.0-cuda11.1-cudnn8-runtime which is suitable configuration for my train.py. CUDA version 11.2 is available in host system.
I write in Dockerfile:
but I take
Traceback (most recent call last): File "//mish-cuda/setup.py", line 19, in
CUDAExtension(
File "/usr/local/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 867, in CUDAExtension
library_dirs += library_paths(cuda=True)
File "/usr/local/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 975, in library_paths
if (not os.path.exists(_join_cuda_home(lib_dir)) and
File "/usr/local/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1982, 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.
Where I should define where CUDA_HOME is in the host environment as I use Docker ?
Thank you in advance!