Understand environment initialization on kernel startup #12241
Unanswered
joel99
asked this question in
Questions and Answers
Replies: 2 comments
-
bump, having a similar problem |
Beta Was this translation helpful? Give feedback.
0 replies
-
also experiencing this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been running some deep networks (with CUDA 11.3) happily, via
.py
jupyter notebooks for a while. I then upgraded from cuda 11.3 -> 11.6 but the notebook constantly thinks I'm using cuda 11.3. Now, I realize I don't even know how cuda 11.3 was initially recognized. So I'm trying to understand where environment variables are being set that could cause this.The cluster I'm using manages cuda via
ModuleFiles
. For example, my.bashrc
and.bash_profile
both callmodule load cuda-11.6
which sets environment variables likeCUDA_PATH
. In vscode shell, this variable is set correctly.Jupyter notebook doesn't load env variables #8270 suggests
.bashrc
is never sourced i.e. I expect no environment variables to be set at all in this case. However, various test variables I put in.bashrc
are set and printed viaos.environ
.However, setting
CUDA_PATH
, either viamodule load
orexport CUDA_PATH=11.6
doesn't survive into the jupyter notebook. Specifically, it appears to be overridden back to11.3
. This suggests some Jupyter initialization is doing this. I attached the jupyter output.vscode_jupyter_debug.txt
Note that for example CUDA_PATH is printed correctly early on.
Based on the logs, I think jupyter can only be inheriting cuda info from a conda environment (
rlpyt
) which has built in cudnn 8.2.0 (corresponding to cuda 11.3), so anything I've previously set with environment variables has been totally irrelevant. Confusingly, several commands are logged from both a new conda env (py10_2
) and this oldrlpyt
). Now my question is -- why is it calling both these environments? How can I specify which one to initialize with? And why does jupyter seem to attempt (and fail) to initialize conda a few times before succeeding (in a different mode)?Beta Was this translation helpful? Give feedback.
All reactions