Hi, I need the libnvoptix.so.1 library for optix applications, however, after installing the most up-to-date driver 515.57, I didn’t find the library above. If I directly extract the run file, I find the libnvoptix.so.515.57. I get quite confused and would like to know how to correctly install the library in the /usr/lib/x86_64-linux-gpu?
Hi @seasandwpy, welcome!
Which version of the OptiX SDK are you using? OptiX 6.5 and earlier have the .so file you need in the SDK, not in the driver. OptiX 7.0 and later include the .so file you need in the Nvidia driver, so you do not need to attempt to manually install yourself.
If you are just starting a new OptiX project, we recommend using the latest SDK (currently as I write this, OptiX version 7.5.) This way you you won’t need to worry about the .so library files or installation.
–
David.
Hi, I am using Optix 7.4. I think the problem now is that the libnvoptix.so.1 is not installed in the target position by the 515.57 run file. If I extract the run file, it contains libnvoptix library. However, after installing the driver with command: sudo ./NVIDIA-Linux-x86_64-515.57.run --no-opengl-files, I still can’t find the libarary in /usr/lib/x86_64-linux-gnu/.
Are you experiencing an error trying to run one of the OptiX samples?
–
David.
Hi,
I’m are trying to set up Optix 7.3 from the downloads section here and use it inside a docker container.
I am following the steps mentioned here for installation. The example executables are failing to locate “libnvoptix.so.1”. I checked running the OptiX SDK in the host VM directly. But it fails with the same error. I checked that the Cuda driver is within the compatible range for Optix 7.3 Below is the stack trace
StackTrace: ---------------------------------------------------------------------------------------------------------------------------------- openat(AT_FDCWD, “/lib/x86_64-linux-gnu/libnvoptix.so.1”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, “/usr/lib/x86_64-linux-gnu/libnvoptix.so.1”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, “/lib/libnvoptix.so.1”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, “/usr/lib/libnvoptix.so.1”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) munmap(0x7ff20091b000, 67099) = 0 — SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} — +++ killed by SIGSEGV (core dumped) +++ ----------------------------------------------------------------------------------------------------------------------------------
Below are the specs of the machine, where i’m trying this:
GPU: NVIDIA A100-PCIE-40GB
Driver Version: 470.182.03
CUDA-VERSION: 11.4
OS: deb 11 Arch: linux/amd64
Docker version: 20.10.9 Nvidia-docker version: 2.5.0
We also tried with passing NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility
as mentioned in the other forum discussions., but it didn’t work.
NOTE: The docker container is on Ubuntu 20 Local Fossa LTS whilst the host VM is in Deb11.
Sounds like the necessary display driver component libnvoptix.so is not accessible inside your Docker container.
Please have a look into these older threads with things to test (strace) and potentially how to install or mount the correct display driver components:
https://forums.developer.nvidia.com/t/optix-6-0-0-inside-nvidia-docker/72968/11
https://forums.developer.nvidia.com/t/render-with-optix-inside-docker/165906
I was struggling again with this issue recently and still found that mounting driver files in the docker by hand is neccessary. Though paths vary a bit wrt the old solution. If you mount into the /usr/lib64
in the docker you’ll need to add it to LD_LIBRARY_PATH
: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64
, but you can also mount into one of folders that are searched for these files, eg: /lib/x86_64-linux-gnu
, /usr/lib/x86_64-linux-gnu
, /lib
, /usr/lib
Here is how to fix this – (added this here: Optix 6.0 not supported in docker · Issue #990 · NVIDIA/nvidia-docker · GitHub – works for docker + OptiX6, OptiX7, etc)
I am adding this for those wondering why OptiX is not working with NVIDIA_DRIVER_CAPABILITIES=graphics
To break it down, you have the “old” option – mounting the needed drivers/libs:
# Assuming the SDK is installed in /tmp/NVIDIA and the `build` directory is within that for the `optixHello` sample
# In this case:
# Ubuntu 20.04
# Cuda 11.4
# NVIDIA 470
# This means we can only go up to Optix7.3 (due to R470)
docker run -v /tmp/NVIDIA:/tmp/NVIDIA \
-v /usr/lib/x86_64-linux-gnu/libnvoptix.so.1:/usr/lib/x86_64-linux-gnu/libnvoptix.so.1 \
-v /usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.470.82.01:/usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.470.82.01 \
--gpus all -it --rm nvidia/cuda:11.4.3-runtime-ubuntu20.04
If you run optixHello
– this will work.
And here is the “new” option:
docker run -v /tmp/NVIDIA:/tmp/NVIDIA \
-e NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility \
--gpus all -it --rm nvidia/cuda:11.4.3-runtime-ubuntu20.04
^ At first attempt this will not work – and most folks that are complaining about it not working are probably running int this – you will see that you have both libs within the container:
/usr/lib/x86_64-linux-gnu/libnvoptix.so.470.82.01
/usr/lib/x86_64-linux-gnu/libnvoptix.so.1
However, looking more closely will show you that /usr/lib/x86_64-linux-gnu/libnvoptix.so.1
is 0 bytes.
The reason is because from the HOST running Docker, you have:
# cd /usr/lib/x86_64-linux-gnu/
# ls -alh | grep libnvoptix
lrwxrwxrwx 1 root root 23 Nov 16 2021 libnvoptix.so.1 -> libnvoptix.so.470.82.01
-rw-r--r-- 1 root root 161M Oct 27 2021 libnvoptix.so.470.82.01
The symlink is translating into an empty map.
The easy way to fix this within the container is:
ln -sf /usr/lib/x86_64-linux-gnu/libnvoptix.so.470.82.01 /usr/lib/x86_64-linux-gnu/libnvoptix.so.1
As soon as you do that it works:
root@0eddf5bed7c2:/tmp/NVIDIA/build/bin# ./optixHello
Caught exception: OPTIX_ERROR_LIBRARY_NOT_FOUND: Optix call 'optixInit()' failed: /tmp/NVIDIA/SDK/optixHello/optixHello.cpp:124)
root@0eddf5bed7c2:/tmp/NVIDIA/build/bin# ln -sf /usr/lib/x86_64-linux-gnu/libnvoptix.so.470.82.01 /usr/lib/x86_64-linux-gnu/libnvoptix.so.1
root@0eddf5bed7c2:/tmp/NVIDIA/build/bin# ./optixHello
[ 4][ KNOBS]: All knobs on default.
[ 4][ DISK CACHE]: Opened database: "/var/tmp/OptixCache_root/cache7.db"
[ 4][ DISK CACHE]: Cache data size: "15.9 KiB"
[ 4][ DISKCACHE]: Cache hit for key: ptx-6766-keydeb0e13958c7dc89fbcbe36c70c7e95d-sm_80-rtc0-drv470.82.01
[ 4][COMPILE FEEDBACK]:
[ 4][COMPILE FEEDBACK]: Info: Pipeline has 1 module(s), 1 entry function(s), 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1 basic block(s) in entry functions, 79 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions
GLFW Error 65544: X11: The DISPLAY environment variable is missing
Caught exception: Failed to initialize GLFW
Hope this helps others.
Ive been stuck here for 4 days, thanks BOSS!