This repository contains the necessary components to create a Docker image that encapsulates a Jupyter Notebook simulation environment for the FACET2 injector. Github actions automatically builds the container and updates the local copy on S3DF. The simulation utilizes both IMPACT and BMAD codes to model and analyze the injector's behavior. The juptyer notebooks are written by . Additionally, the repository includes a script to facilitate running the Docker container on the S3DF platform.
The Docker image is designed to provide a ready-to-use simulation environment with pre-installed dependencies and configurations necessary for running IMPACT and BMAD simulations. The core of this environment is a Jupyter Notebook that guides users through the simulation process, from setting up initial conditions to visualizing the results.
Jupyter Notebook: Contains the simulation workflow, including setup, execution, and analysis steps.
IMPACT: A particle accelerator simulation tool used for the initial stages of the simulation.
BMAD: A library for simulating charged particle beams and designing accelerators, used in the latter stages of the simulation.
Included in this repository is a script that simplifies the process of deploying and running the Docker container on the S3DF platform. This script handles copying the notebooks to a working directory on s3df and runs a local copy of the container on s3df.
To run the Docker container on S3DF, execute the provided script with the necessary parameters. Instructions are on confluence ()
Go to the repository on GitHub.
Click on "Use this template" in the top right corner.
Create your new repository from this template.
In your new repository, navigate to the Dockerfile
.
Locate the section where conda
packages are installed:
Edit the list and similar parts to include or exclude packages as needed for your project.
Navigate to the ./notebooks
directory.
Replace the existing notebooks with your own notebooks that are needed for your project.
Go to the settings of your new GitHub repository.
Navigate to Secrets
under the Security
section.
Add the necessary secrets for your Docker container to be built and pushed to Docker Hub.
These secrets might include DOCKER_HUB_ACCESS_TOKEN
, DOCKER_HUB_USERNAME
, SSH_PASSWORD
and any other necessary credentials (ssh username).
Ensure the path where the container is pulled to on S3DF (in the pull_to_s3df.yml
GitHub Actions workflow) matches the path referenced in ondemand.sh
.
Edit the pull_to_s3df.yml
file as necessary to match your configuration.
Connect to the S3DF OnDemand portal.
Start a Jupyter instance using a custom Singularity (Apptainer) image.
Paste the ondemand.sh
script into the box below the custom Apptainer image on the OnDemand portal.
For any issues or questions regarding the setup, execution, or other aspects of using this Docker image, please refer to the documentation provided [] or contact sanjeev@slac.stanford.edu.