We recommend using a fresh Conda environment for each of your projects - whether you’re working on your own machine or on the RCS compute service. In fact, keeping track of the libraries you use by carefully managing your environments can make it much easier to subsequently get your code running on the compute service or anyone else’s machine - keeping your research reproducible.
This advice also applies to Jupyter notebooks. To make an existing Conda environment accessible in the RCS Jupyter service, simply add the ipykernel
package:
conda install ipykernel
And then log in to Jupyter, where you’ll have the option to create a new notebook using that environment.
If you’re starting from scratch then you can add ipykernel
alongside any other packages that you use to initialise a new environment:
conda create --name torch pytorch ipykernel
And then go to Jupyter and create a new Notebook with kernel “Python [conda env:torch]”.
Further resources
- The Research Computing Service’s Essential Software Engineering for Researchers course explains more about virtual environments and package management, including Conda