Milady users can run the code without compilation thanks to the pre-built image we provide. Depending on your environment (workstation, cluster, supercomputer), you will have to rely on different tools for running the image:
- Docker Engine (on workstations)
- Singularity (on shared resources, for rootless execution)
- pcocc (CEA alternative to Singularity, available on TGCC resources)
You can pull and run the pre-built image using the following commands:
- Pull the image from Docker Hub:
docker pull aallera/milady:latest
- Run the container with the current directory mounted as a volume (of course without compiling the code):
docker run -it --rm -v "$(pwd):/workspace" aallera/milady
The option -it
enables the interactive mode with a pseudo-TTY
session, allowing to kill the process before it ends (ctrl-C).
Optionally, additional options to mpirun
such as the number of
processors (default is -np 4
) can be passed as:
docker run -it --rm -v "$(pwd):/workspace" aallera/milady -np 8
docker run -it --rm -v "$(pwd):/workspace" aallera/milady shell
Locally (takes a long time):
docker save milady:<tag> | gzip > milady_<tag>.tar.gz
On Irene (after transfering the created file):
gzip -d milady_latest.tar.gz
pcocc image import docker-archive:milady_latest.tar milady
Interactive use:
# (optional) ccc_mprun -p skylake -m scratch,work -s
pcocc run --mount "$(pwd):/workspace" -s -I milady -- -np 16
Submit as a job:
#!/bin/bash
#MSUB -n 4
#MSUB -c 8
#MSUB -q skylake
#MSUB -T 600
#MSUB -A <your submission group>
pcocc run -n ${BRIDGE_MSUB_NPROC} -I my_docker_image [arg1, ...]
- Start a pre/post session to access a large RAM node (singularity build takes more ram than the standard 5 Go).
srun --pty --nodes=1 -A yxs@cpu --ntasks-per-node=1 --cpus-per-task=10 --partition=prepost --hint=nomultithread --time=01:00:00 bash
- Build singularity image (.sif)
singularity build milady.sif docker://aallera/milady:1.0.1
- Add to allowed directory
idrcontmgr cp milady.sif
- Start a shell, with access to $WORK. Other directories are read-only.
singularity shell $SINGULARITY_ALLOWED_DIR/milady.sif --bind $WORK/:/MLD/work
- Clone the current repository
- Clone the milady repository inside it
./clone_milady.sh
- Build the Docker image using the following command:
docker build -t milady .
This command will compile the MILADY code during the image build process.
- Create a free account on Docker Hub (https://hub.docker.com/) if you don’t have one already.
- Log in to your Docker Hub account on your machine using the following command:
docker login
- Tag your local image with your Docker Hub username and a custom name for the image:
docker tag milady YOUR_DOCKERHUB_USERNAME/milady:<tag>
Replace YOUR_DOCKERHUB_USERNAME
with your actual Docker Hub username
and <tag>
with a version.
- Push the tagged image to Docker Hub:
docker push YOUR_DOCKERHUB_USERNAME/milady:<tag>