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

Make torch environment default in jupyterlab-pytorch image #294

Open
StanHatko opened this issue Oct 1, 2021 · 1 comment
Open

Make torch environment default in jupyterlab-pytorch image #294

StanHatko opened this issue Oct 1, 2021 · 1 comment

Comments

@StanHatko
Copy link
Contributor

StanHatko commented Oct 1, 2021

For the jupyterlab-pytorch image, the conda environment needs to be used for the torch package to be accessible. The whole point of jupyterlab-pytorch is to run PyTorch, so the conda environment should be the default in the terminal and notebooks.

For the terminal, this can be done by automatically running conda activate torch at startup. Previously I had to run bash since the default shell was previously incompatible with conda activate, but now that's no longer necessary, conda activate is now working for me in the default shell. This will make it so the torch conda environment will always be the active one in the terminal, which means Python scripts and command-line Python will always use the correct environment (the torch one). Alternatively, after any jupyterlab setup is done, is there any other way to make the torch environment the default one in conda?

For notebooks, to use torch it's necessary to select the correct environment for the kernel, as shown in the attached screenshot. Please make Python [conda env:torch] the default kernel so PyTorch will work automatically in new notebooks.

aaw10

@StanHatko
Copy link
Contributor Author

StanHatko commented Oct 1, 2021

Actually I just tested again, and conda activate is now working in the default shell. I've updated the issue to reflect that.

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

No branches or pull requests

2 participants