srun --pty bash
For more information, see the Interactive paragraph in the Batch Compute page.
We provide automatic tunnels through our ondemand proxy of Jupyter instances. This means that in order to run Jupyter kernels on SDF, you do not need to setup a chain of SSH tunnels in order to show the Jupyter web instance.
To launch an instance of Jupyter, you can use the Jupyter portal.
?> Note: As the Jupyter instances run on top of our slurm environment, your instances will be subject to queuing and time limits. It is recommended that if Jupyter is vital to your analysis, that hardware be added to SDF to ensure priority non-preemptive access.
We also provide the capability for you to 'bring-your-own-Jupyter' so that all your code dependencies are dictated by you, and not by us. We recommend you do this by either building a singularity image of your Jupyter environment or by building a conda environment on SDF storage.
If you wish for your jupyter environment to be more widely used (e.g. for others in your group), you can submit a pull-request to our slac-ood-jupyter repo to append your specific "Commands to initiate Jupyter" onto the list of preselectable Jupyter Images. Specifically, you will want to change form.yml.erb.
Once you have created your Conda environment on SDF (see Software/Conda), ensure that you have jupyter installed in your conda environment:
conda install -c conda-forge jupyterlab
Then go to Jupyter portal, and select "Custom Conda Environment..." from the "Jupyter Instance" dropdown. You will need to customize the text that appears under "Commands to initiate Jupyter" to point to your custom conda environment:
export CONDA_PREFIX=<path-to-miniconda3>
export PATH=${CONDA_PREFIX}/bin/:$PATH
source ${CONDA_PREFIX}/etc/profile.d/conda.sh
conda env list
conda activate <your-environment-name>
Replace <path-to-miniconda3>
and <your-environment-name>
appropriately.
Fill the rest of the form as you would for any provided Jupyter Instance and click "Launch". If you run into any issues, please see Debugging your interactive session.
Once you have built or pulled a Singularity image on SDF (see Software/Singularity page for more information on how to do that), ensuring that you have the jupyter[lab]
binary in the image's PATH
, go to the Jupyter portal, select "Custom Singularity Image" from the "Jupyter Instance" dropown menu. Then modify the text in the "Commands to initiate Jupyter":
export SINGULARITY_IMAGE_PATH=<path-to-the.sif>
function jupyter() { singularity exec --nv -B /sdf,/gpfs,/scratch,/lscratch ${SINGULARITY_IMAGE_PATH} jupyter $@; }
Replace <path-to-the.sif>
with the full path to your local singularity image file.
Fill the rest of the form as you would for any provided Jupyter Instance and click "Launch". If you run into any issues, please see Debugging your interactive session.
If you get an error while using your Jupyter instance, go to the My Interactive sessions page, identify the session you want to debu and click on the Session ID link. You can then View the output.log
file to troubleshoot.
Launch web based access