You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue occur when all extensions are disabled?: Yes/No - N/A: This concerns extensions. Was brought to this Issue page by Pressing "Report issues" link on bottom right of VSCode documentation page "Working with Jupyter Notebooks".
VS Code Version: 1.72.2
OS Version: Local: MacOS 12.3, Remote: Ubuntu 20.04
Steps to Reproduce:
On remote system, set environment variable -- any environment variable, but I'll do CUDA_VISIBLE_DEVICES -- inside .bashrc:
Verify in Remote-SSH Terminal that environment variable is properly set and recognized:
$ echo$CUDA_VISIBLE_DEVICES
7
Run a Juptyer notebook remotely - ie using extensions Remote SSH and Jupyter (installed both locally and on remote system, by choosing Yes whenever prompted. Ensure that Kernel on remote system is properly set when executing notebook).
Observe that your settings are completely ignored: system will execute on GPU 0 instead of GPU 7, and no such environment variable is recognized in the Jupyter notebook execution:
importosos.environ['CUDA_VISIBLE_DEVICES']
---------------------------------------------------------------------------KeyErrorTraceback (mostrecentcalllast)
CellIn [8], line21importos---->2os.environ['CUDA_VISIBLE_DEVICES']
File/usr/lib/python3.8/os.py:675, in_Environ.__getitem__(self, key)
672value=self._data[self.encodekey(key)]
673exceptKeyError:
674# raise KeyError with the original key value-->675raiseKeyError(key) fromNone676returnself.decodevalue(value)
KeyError: 'CUDA_VISIBLE_DEVICES'
Expected behavior:
That environment variables set in .bashrc, which Remote-SSH extension recognizes, would be preserved when remotely running Jupyter notebooks. (And thus I would be able to control which GPU it executes on, as I do when invoking jupyter locally.)
The text was updated successfully, but these errors were encountered:
Answer: Devs of vscode-jupyter extension think it's "weird" to launch a kernel from a shell (whereas I submit that's the only way the rest of us have ever done it).
Does this issue occur when all extensions are disabled?: Yes/No - N/A: This concerns extensions. Was brought to this Issue page by Pressing "Report issues" link on bottom right of VSCode documentation page "Working with Jupyter Notebooks".
Steps to Reproduce:
CUDA_VISIBLE_DEVICES
-- inside.bashrc
:Run a Juptyer notebook remotely - ie using extensions Remote SSH and Jupyter (installed both locally and on remote system, by choosing Yes whenever prompted. Ensure that Kernel on remote system is properly set when executing notebook).
Observe that your settings are completely ignored: system will execute on GPU 0 instead of GPU 7, and no such environment variable is recognized in the Jupyter notebook execution:
Expected behavior:
That environment variables set in .bashrc, which Remote-SSH extension recognizes, would be preserved when remotely running Jupyter notebooks. (And thus I would be able to control which GPU it executes on, as I do when invoking jupyter locally.)
The text was updated successfully, but these errors were encountered: