We have deployed JupyterHub at https://jupyter.stat.berkeley.edu so that you may remotely run Jupyter notebooks (IPython using Python 3, R, MATLAB, and iTorch notebooks as well as terminal sessions) on SCF machines. By default, your notebook will be spawned onto the first available standalone Linux server, however you may optionally start your notebook on a cluster node in case you need access to more processing power. You can also pass SBATCH options to your notebook and specify prologue commands that will run prior to your notebook startup. Please let us know if you have any difficulties or if you need us to add features to it.
Stopping Your Server
To stop your server (and free up resources for other users), please select "Control Panel" and choose "Stop My Server". Note that selecting "Logout" does not free up resources for other users as it keeps your server running.
To use JupyterLab, follow the instructions above but instead of selecting an option under "New", instead change the URL in your browser so that it ends in "/lab" in place of "/tree". This will switch you to JupyterLab, from which you can start notebooks and use other functionality. Note to exit your session you can select "File -> Hub Control Panel" and then choose "Stop My Server". Or you can switch back to "/tree" in the URL and stop your server as above.
All Python 3 and R packages installed on the system, as well as packages installed by users within their home directories, should be available.
Using a Custom Conda Environment
If you would like your jupyter notebook to leverage your own conda environment, you can prepare a custom Jupyter kernel:
# Switch to your conda environment source activate /path/to/your/custom/conda/env # Install the ipykernel package for python conda install ipykernel # Create a new jupyter kernel python -m ipykernel install --user --name=mycondakernel
Once you have created the kernel, you can access it from the classic notebook through New > mycondakernel. You can do the same with an R-based kernel:
# Use the conda-forge channel conda config --add channels conda-forge conda config --set channel_priority strict # Activate your environment source activate ~/.conda/envs/myr # Install a faster package resolver conda install mamba # Install R and the IRkernel mamba install r r-irkernel # Create a new jupyter kernel named "My R" r -e "IRkernel::installspec(displayname='My R')"