Skip to content

Launch Instance

Saravanabalagi Ramachandran edited this page Jan 14, 2020 · 2 revisions

SSH into the server and run,

cd ~/singularity_images
singularity instance start --nv \
                            --contain \
                            --home $HOME \
                            --bind ~/Projects/Python:/projects \
                            --bind /data:/data \
                            tf2.sif \
                            tf2

Change the arguments appropriately:

  • tf2.sif: Singularity Image file location
  • tf2: Instance Name
  • --bind directory_in_host:location_inside_container: The directory ~/Projects/Python present on the host machine will be mapped to /projects inside the singularity image.
  • You can add may --binds to bind more directories on the host to the container.
  • --home directory_in_host: Special bind command maps the directory to ~ inside the singularity image.

Note

  • --nv flag binds native Nvidia libraries to the container and without this flag you will not be able to access the GPUs from inside the container.

  • If container is launched without --contain flag, /tmp folder will be linked to host's /tmp folder (where other users have read permissions) resulting in leaking user specific and sensitive information.

For more details, see singularity docs.

Clone this wiki locally