...
Uses code from Eric's https://github.com/ericcropp/Impact-T_Examples
Notes:
if you Jupyter sessions doesn't start make sure there is enough room in your home directory. Run the below command to check after you are in your home dir.
Code Block |
---|
df -h .
|
you can also edit the custom apptainer script to copy the notebook files to another path such as /sdf/group/facet/<your-name> (if you have permissions to)
MPI is being implemented and will work soon.
Currently each time you start the container, it overwrites any past changes you made to the notebook. This will be fixed soon.
Via Open OnDemand:
(no port forwarding needed)
- login to open ondemand at https://s3df.slac.stanford.edu/ondemand
- click on the top menu bar and choose interactive apps → Jupyter
- Select Custom for Jupyter Image
- Select Apptainer Image
- Set the "Commands to initate Jupyter" to be:
Code Block # Set the environment variable for the Apptainer image path export APPTAINER_IMAGE_PATH=/sdf/group/facet/sanjeev/containers/impact-bmad_latest.sif export NOTEBOOK_ROOT=$HOME/impact_bmad_container_notebooks mkdir -p $HOME/impact_bmad_container_notebooks # Define the jupyter function to use Apptainer for executing Jupyter with necessary bindings and running mkdir and cp commands function jupyter() { apptainer exec -B /sdf,/fs,/sdf/scratch,/lscratch ${APPTAINER_IMAGE_PATH} bash -c " mkdir -p ${NOTEBOOK_ROOT} && cp -r /opt/notebooks/* ${NOTEBOOK_ROOT}/"; apptainer exec -B /sdf,/fs,/sdf/scratch,/lscratch ${APPTAINER_IMAGE_PATH} jupyter $@; }
- Click use JupyterLab instead of Jupyter Notebook
- For run on cluster type select: Batch; s3df; account: FACET; Partition Milano
- Select number of hours and cores
- Configure rest of settings - *to use the FACET account you need to be added via coact; you can try using the beamphysics account if FACET doesnt work.
- Launch and connect
- The container will copy the necessary notebooks to $HOME/impact_bmad_container_notebooks. Click on this directory via the Jupyter UI and run the Impact / Bmad Sim. Notes: MPI is being implemented and will work soon. Currently each time you start the container, it overwrites any past changes you made to the notebook. This will be fixed soon.