LPDI-EPFL / masif_seed

Masif seed paper repository
Apache License 2.0
129 stars 31 forks source link

Singularity representation of the Docker container #12

Open slives-lab opened 1 year ago

slives-lab commented 1 year ago

To run on an HPC, I'm wondering if you have a singularity representation of the Docker container

ugeshe commented 1 month ago

Steps to use apptainer (singularity) with Dockerfile

Activate your conda environment and install spython

pip install spython

Convert Dockerfile to Singularity Definition file

spython recipe Dockerfile Singularity

Building Singularity Image

apptainer build masif_seed_container.sif Singularity

Run Image container

apptainer run masif_seed_container.sif apptainer exec masif_seed_container.sif python your_file.py

Run Image Container with GPU Support

apptainer run --nv masif_seed_contaier.sif
apptainer exec --nv masif_seed_container.sif nvidia-smi

Mount Current Directory to Container

apptainer shell --bind $PWD:$PWD masif_seed_container.sif

For more details, refer apptainer docs