using different version of cuda for different jupyter kernels #9561
-
I am working with different projects using different versions of Tensorflow. Each Tensorflow version depends on it's specific CUDA version. Normally when I change conda environment, I will manually change system path and LD_LIBRARY_PATH in order to ensure correct CUDA version setting. For VSCode jupyter, if I first specify the CUDA version with explicit environment variable settings: export PATH=/usr/local/cuda-11.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH TF can properly recongnize the CUDA libraries and work with gpu. But this does not load the CUDA library if I directly use vscode-juypter notebook. Any help? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the question. If this still doesn't work, please file an issue here https://github.com/microsoft/vscode-jupyter/issues |
Beta Was this translation helpful? Give feedback.
-
Seems the instruction in https://code.visualstudio.com/docs/python/environments#_variable-substitution needs to be updated according to this thread the cursive path substitution does not require namespace pretending |
Beta Was this translation helpful? Give feedback.
Thanks for the question.
You can update the env variables such as PATH and LD_LIBRARY_PATH by creating a .env file in your workspace.
When the kernel is started and code executed, the env variables from the
.env
file will be used.If this still doesn't work, please file an issue here https://github.com/microsoft/vscode-jupyter/issues