Closed tonyf closed 1 year ago
I was experimenting with docker some time ago and OptiX parts of the NVIDIA driver were not injected correctly. The trick was to do it manually:
docker run \
-v /usr/lib/x86_64-linux-gnu/libnvoptix.so.1:/usr/lib64/libnvoptix.so.1 \
-v /usr/lib/x86_64-linux-gnu/libnvoptix.so.418.56:/usr/lib64/libnvoptix.so.418.56 \
-v /usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.418.56:/usr/lib64/libnvidia-rtcore.so.418.56 \
--rm --runtime=nvidia -it optix-docker-test sh
The above was working with an old driver. Please, give it a try with v530, if it does not work, I'll investigate what else is missing. Your error message "Compatible device(s) not found" is the sign that it is still the same problem with the driver.
Can these be baked into the image itself? I'm assuming no because it's specific to the driver version
Just tried this with the same issue
docker run -it \
-v /usr/lib/x86_64-linux-gnu/libnvoptix.so.1:/usr/lib64/libnvoptix.so.1 \
-v /usr/lib/x86_64-linux-gnu/libnvoptix.so.530.41.03:/usr/lib64/libnvoptix.so.530.41.03 \
-v /usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.530.41.03:/usr/lib64/libnvidia-rtcore.so.530.41.03 \
-e NVIDIA_VISIBLE_DEVICES=all \
--gpus all render-slim bash --
OptiX initialization failed.
Unknown OptixResult code: Compatible device(s) not found / OptiX not initialized.
PathTracer destructor failed.
[ERROR] (MainThread) Initial setup failed, see errors above.
<NpOptiX(Thread-1, initial)>
OK, thanks for checking. I'll try to make it running and let you know.
It seems to work, though I had to add the path where driver .so
's were mounted to LD_LIBRARY_PATH
:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64
You can also try mounting into one of folders that are searched for libnvoptix.so.1
. strace
showed me these: /lib/x86_64-linux-gnu
, /usr/lib/x86_64-linux-gnu
, /lib
, /usr/lib
.
Btw. I tested on the "base" nvidia image, 12.0.0-base-ubuntu20.04
, where CUDA toolkit is not installed. The driver libraries are enough to run OptiX (unfortunately not mounted correctly by nvidia docker...).
That worked! Thank you!
Hey @robertsulej, we're running into the same issue when trying to run plotoptix
. strace
output shows that libnvoptix.so
is being read:
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libnvoptix.so.1", O_RDONLY|O_CLOEXEC) = 11
read(11, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0w\6\0\0\0\0\0"..., 832) = 832
fstat(11, {st_mode=S_IFREG|0644, st_size=189105240, ...}) = 0
mmap(NULL, 191393312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 11, 0) = 0x7fbcec979000
mprotect(0x7fbcf7a94000, 2093056, PROT_NONE) = 0
mmap(0x7fbcf7c93000, 3399680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 11, 0xb11a000) = 0x7fbcf7c93000
mmap(0x7fbcf7fd1000, 192032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbcf7fd1000
close(11)
We are on driver version 515, I see that the project page says you need >=530. Could that be why?
It might be. If you cannot upgrade the driver, you can try earlier release 0.14.4 (here on PyPI) instead, it should work with the driver r515.
I'm trying to run plotoptix within a docker container via
docker run -it -e NVIDIA_VISIBLE_DEVICES=all --gpus all render-slim bash --
However, when calling
I get
nvidia-smi output
Here's my Dockerfile:
I've also tried this with a similar image based on
nvidia/cuda:11.7.0-cudnn8-devel-ubuntu20.04
with the same result.I've tried running this on the following GPUs:
Any pointers on how to resolve?