Setup and Apptainer

Initial setup

Before we get started with running notebooks on Sockeye, we have to pull the requisite container images, and set up some scripts.

Parameter
Description

<allocation>

Sockeye allocation

<CWL>

Your CWL

Pulling the container

[!NOTE]

  • We'll be storing all of our container images inside /arc/project/<allocation>/jupyter as per UBC Confluence convention. They can be stored elsewhere, but this document uses the UBC Confluence convention, so you will have to adapt the paths if you store them elsewhere.

Instructions

  1. Create the directory in /arc/project/<allocation>/<cwl> to store your images.

    mkdir /arc/project/<allocation>/<cwl>/images
  2. Pull the jupyter/datascience-notebook container from quay.io into your image folder.

     module load gcc apptainer
     cd /arc/project/<allocation>/<cwl>/images
     apptainer pull --name jupyter-datascience.sif docker://quay.io/jupyter/datascience-notebook

    Updating your container

    Many times, containers have to be updated to bring in the latest Python/R/compiler versions. You can overwrite the current file with a new version by running:

    apptainer pull --force --name jupyter-datascience.sif docker://quay.io/datascience-notebook
  3. Set up the Slurm job.

    First, create a job directory in /scratch for your personal Jupyter Notebooks to use as scratch space - ARC Sockeye has a file count quota on top of a file size quota, and files produced by Jupyter can cause you to hit this limit. Run this command to do so:

    mkdir -p /scratch/<allocation>/<cwl>/my_jupyter

    Now, put this script wherever you would like. A good spot could be in your home folder, but in this guide, we'll use /arc/project/<allocation>/<cwl>/jupyter-datascience.sh. Make sure to replace the parameters in angle brackets with your allocation and cwl!

chevron-rightJob scripthashtag

Next steps

Now that you're "done" setting up, here are some next steps.

Happy with packages

If you are happy with the packages that are installed in the jupyter-datascience image, then you can proceed to Initializing a Jupyter Notebook Instance.

Need GPUs?

See Adding GPU Support. Do this before you create new environments.

Need more packages?

If you (suspect) you require more packages in your notebook's environment, have a look at Creating Custom Environments.

Last updated