train.sh runs the model inside an Apptainer (Singularity) image:
apptainer exec --nv $CONTAINER python main.py fit ...where CONTAINER points to a .sif file. The Dockerfile defines the
environment; you just need to turn it into that .sif file. Three steps:
From the project root (where the Dockerfile is):
docker build -t atlas:latest .HPC clusters use Apptainer, not Docker, so convert the image:
# Save the Docker image to a tar archive
docker save atlas:latest -o atlas.tar
# Build the .sif from that archive
apptainer build atlas.sif docker-archive://atlas.tar(If your machine has Apptainer with Docker access, you can skip the tar step:
apptainer build atlas.sif docker-daemon://atlas:latest.)
Copy atlas.sif to your cluster and set the path at the top of train.sh:
CONTAINER=/path/to/atlas.sifNow train.sh (or sbatch train.sh) will run training inside the container.
The --nv flag gives the container access to the GPU.