Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container always use cuda of the host machine, how to disable it? #426

Open
Queequeg92 opened this issue Mar 25, 2024 · 2 comments
Open

Comments

@Queequeg92
Copy link

I followed the installation guide and installed nvidia-container-toolkit successfully. But no matter what docker image I use, the container always uses the cuda of the host machine. How to use docker image's own cuda? Thank you!
Untitled

@elezar
Copy link
Member

elezar commented Mar 25, 2024

The CUDA Version displayed by nvidia-smi is the CUDA DRIVER version and not the runtime version. The driver libraries are injected from the host so as to be able to communicate with the kernel mode driver that is installed there.

Running a device query sample should show the RUNTIME CUDA version in addition to the driver CUDA version.

@JulienSantiago
Copy link

JulienSantiago commented Jun 4, 2024

Hi everyone

I have the same issue :

I want to run cuda 10.1 inside a docker container, but I require different drivers, and nvidia-smi displays the host machine drivers.

Plus I really think that there is a cuda version issue because I need to use cuda 10.1 to run tensorflow 2.3.0 (https://www.tensorflow.org/install/source#tested_build_configurations) and when running
python3 -c "import tensorflow as tf; print('GPU(s) disponibles:' if len(tf.config.list_physical_devices('GPU')) > 0 else 'Aucun GPU disponible.')" in the docker,

I have

Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64:

And I saw on stackoverflow that this error is linked to using non-coherent cuda version

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants