These are steps for running a jupyter notebook on S3DF via juptyerlab. These instructions assume a first time setup of connecting to s3df.
Use this method only for viewing and editing notebooks or running very non computationally intensive notebooks. The kind people running S3DF get unhappy when you run a multi core simulation on interactive compute. Instead see Running Notebooks on Batch Compute.
- Get a S3DF account
- Wait for approval
Ssh into s3df login node with port forwarding (5555 can be changed to any preferred port): note: make sure this ssh is from your local machine as we need to have port 5555 open on the connection all the way from your local machine to jupyter lab on s3df.
Code Block ssh -L 5555:localhost:5555 <SLAC UNIX USERNAME>@s3dflogin.slac.stanford.edu
if connecting from Windows' command line (cmd), specify the following:
Code Block ssh -m hmac-sha2-512 -L 5555:localhost:5555 <SLAC UNIX USERNAME>@s3dflogin.slac.stanford.edu
Connect to Iana :
Code Block ssh -L 5555:localhost:5555 iana
- Allocate compute via slurm and connect to it. *this step may be skipped if your notebook is not computationally intensive. *make sure your account is part of the FACET repo or use ad:beamphysics if you are a part of that repo (more info). You can change the parameter after
-n
to choose how many cores you want the notebook to have.Code Block srun --partition milano --account FACET -n 100 --time=01:00:00 --pty /bin/bash
Activate conda env: If conda is not installed see instructions here
Code Block conda activate <CONDA ENV>
** do only first time ** install jupyter lab if not installed:
Code Block conda install jupyterlab
- Run jupyter and click on the link link localhost url to open in your browser:
Code Block |
---|
jupyter lab --no-browser --port 5555 |
...