diff --git a/README.md b/README.md index a4536c35e..1be096c2e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ ## Installation -You can install this package and dependences in a [python virtual environment](#virtual-environment) or use a [Docker container](#install-in-docker) (recommended). +You can install this package and dependences in a [python virtual environment](#virtual-environment) or use a [Docker/Singularity/Apptainer container](#install-in-docker) (recommended). *TL;DR to install the Jax version for GPU run:* @@ -89,7 +89,8 @@ pip3 install -e '.[full]' ## Docker -We recommend using a Docker container to ensure a similar environment to our scoring and testing environments. +We recommend using a Docker container to ensure a similar environment to our scoring and testing environments. +Alternatively, a Singularity/Apptainer container can also be used (see instructions below). **Prerequisites for NVIDIA GPU set up**: You may have to install the NVIDIA Container Toolkit so that the containers can locate the NVIDIA drivers and GPUs. @@ -133,6 +134,25 @@ To use the Docker container as an interactive virtual environment, you can run a ### Running Docker Container (End-to-end) To run a submission end-to-end in a containerized environment see [Getting Started Document](./getting_started.md#run-your-submission-in-a-docker-container). +### Using Singularity/Apptainer instead of Docker +Since many compute clusters don't allow the usage of Docker due to securtiy concerns and instead encourage the use of [Singularity/Apptainer](https://github.com/apptainer/apptainer) (formerly Singularity, now called Apptainer), we also provide instructions on how to build an Apptainer container based on the here provided Dockerfile. + +To convert the Dockerfile into an Apptainer definition file, we will use [spython](https://github.com/singularityhub/singularity-cli): +```bash +pip3 install spython +cd algorithmic-efficiency/docker +spython recipe Dockerfile &> Singularity.def +``` +Now we can build the Apptainer image by running +```bash +singularity build --fakeroot .sif Singularity.def +``` +To start a shell session with GPU support (by using the `--nv` flag), we can run +```bash +singularity shell --nv .sif +``` +Similarly to Docker, Apptainer allows you to bind specific paths on the host system and the container by specifying the `--bind` flag, as explained [here](https://docs.sylabs.io/guides/3.7/user-guide/bind_paths_and_mounts.html). + # Getting Started For instructions on developing and scoring your own algorithm in the benchmark see [Getting Started Document](./getting_started.md). ## Running a workload