MacOS with Docker
Local Development: MacOS with Docker
Running containers locally on a Mac can be a powerful way to test scientific software and develop analysis workflows before deploying them on JLab’s HPC systems. It is not recommended to perform analysis on your local machine! Jefferson Lab has a robust data preservation and backup strategy. Jefferson Lab CST staff will not be able to recover lost data on your local machine. i.e. your thesis data.
Prerequisites
-
Install Docker Desktop for Mac
Download from: https://docs.docker.com/desktop/setup/install/mac-install/ -
Enable virtualization in your system settings if prompted.
-
After installation, verify Docker is running:
docker version
Pull the Base Container
JLab provides a tested container called jlab-base:alma9.5
, available from the internal registry (codecr.jlab.org
). If you're experimenting locally, you can also use a public image for testing, such as:
docker pull almalinux:9.5
To use JLab's image locally:
- First log in with a personal access token:
docker login codecr.jlab.org
- Then pull the image:
docker pull codecr.jlab.org/scicomp/jlab-base:alma9.5
Run a container interactively
docker run --rm -it \
-v $HOME:/home/user \
codecr.jlab.org/scicomp/jlab-base:alma9.5
This mounts your home directory for file access and opens an interactive shell.
ℹ️ Notice mounting your home directory on your local Mac is different than your CUE Home on JLab computers. This is another reason NOT to mount $HOME directly as
/home
.
Notes for MacOS Users
- MacOS does not have a native Linux kernel. Docker uses a lightweight Linux VM underneath.
- File access through volume mounts (-v) is slower on Mac due to file system bridging. Avoid frequent writes from inside the container if performance is critical.
- You can bind mount any folder under $HOME, but avoid /Volumes, /System, or paths with complex ACLs.
ℹ️ Use
.bashrc
orentrypoint.sh
only if needed — default environments in jlab-base are often sufficient for typical workflows.