Closed FrancescoCasalegno closed 2 years ago
1) The Deep-Atlas repo is now cloned on GitLab as a mirror from the GitHub repo. We followed instructions here and here. The token has a validity of 90 days and will need to be renewed.
2) For Deep-Atlas developers:
2.1) The Deep-Atlas docker container can be found at "Packages & Registries" > "Container Registry"
2.2) To update the docker image, run the following commands (on the local machine):
2.3) docker login bbpgitlab.epfl.ch:5050
2.4) docker build -f docker/Dockerfile -t bbpgitlab.epfl.ch:5050/ml/deep-atlas
2.5) docker push bbpgitlab.epfl.ch:5050/ml/deep-atlas
3) For Deep-Atlas users (on BB5):
3.1) Connect via ssh
to BB5, allocate a node with salloc
, and load the module for singularity:
module load unstable singularityce
.
3.2) Pull the docker image from GitLab and convert it to a singularity image:
singularity pull --docker-login --no-https docker://bbpgitlab.epfl.ch:5050/ml/deep-atlas:latest
3.3) Run the singularity container:
singularity exec --cleanenv --containall --bind $TMPDIR:/tmp,/gpfs/bbp.cscs.ch/project,$HOME:/home deep-atlas_latest.sif bash
3.4) There is no write access inside the singularity container, so results have to be written, for instance, to the /home
directory or inside of projXX
using the mounted gpfs
filesystem (see option --bind
above).
@GianlucaFicarelli @mgeplf
Hi @EmilieDel @drsantos89 ,
Before closing this issue I would suggest the following steps.
Dockerfile
by replacing MY_USER_ID
with DEAL_USER_IDS
, and let people know (add info relative to it in README.md
) that this is a comma-separate list of <username>/<userid>
such as "$(whoami)/$(id -u)"
.Dockerfile
, we can have a line testing for the variable to be define and print a warning like so:
RUN test -n "$DEAL_USER_IDS" || echo "WARNING: variable DEAL_USER_IDS was not set, creating only default user 'guest/1000' !"
README.md
with info on how to use Singularity as a user on BB5 (i.e. more or less the content of point 3. in this comment) in a sub-section of the "Docker" section.projXX
folders on gpfs
.salloc
a node with GPU (I think it should be -C volta
but double check that on Confluence). Can we then run with the GPU in the Singularity container? Are the nvidia
libraries all correctly set up?I confirm that we can write on /gpfs/
in Singularity container.
GPU working with --nv
flag on singularity
tested with:
salloc -N 1 -A proj101 -p interactive -C volta -t 1:00:00 --ntasks-per-node 36
singularity exec --cleanenv --nv --containall --bind $TMPDIR:/tmp,/gpfs/bbp.cscs.ch/project,$HOME:/home deep-atlas_latest.sif bash
(docker base image was also updated from cuda 10.2 to 11.4, to match bb5)
(docker base image was also updated from cuda 10.2 to 11.4, to match bb5)
Also tried with cuda 10.2
, and even if doesn't match the CUDA version of the underlying system it seems to work perfectly fine.
Context
We are now able (see #47, #49) to create a
docker
image and run it in a container on our workstations. However, we also need to be able to run the image on BB5, where instead ofdocker
we havesingularity
[^1].Actions
The following are the instructions to follow (in case of issues, please contact @GianlucaFicarelli).
singularity
.~docker push
a locally built Docker image (it will be something likedocker push bbpgitlab.epfl.ch:5050/ml/Deep-Atlas
).ssh
to BB5, allocate a node withsalloc
, and load the module forsingularity
:singularity
image in a container[^2][^3][^1]: Recently
singularity
became part ofapptainer
, but the fork forsingularity
is still maintained as separate from theapptainer
fork. Documentation and interfaces for the two forks are mostly interchangeable. Anyway, at BBP we apparently prefer to stick with thesingularity
fork. [^2]: By default,singularity
passes all environment variables to the environment within your container. To avoid this, we use--cleanenv
. [^3]: The--containall
option allows you to run the software in the container with only minimal access to the host operating system. One of the filesystems which are no longer mounted within the container is/tmp
, but we can still bind it by adding--bind $TMPDIR:/tmp
.