-
Notifications
You must be signed in to change notification settings - Fork 1
Run on Image
Saravanabalagi Ramachandran edited this page Jan 14, 2020
·
1 revision
Running directly on the image without launching instances is not recommended!
WARNING: If you were to do something like this from within a container you would also see the service start, and the web server running. But then if you were to exit the container, the process would continue to run within an unreachable mount namespace. The process would still be running, but you couldn’t easily kill or interface with it. This is a called an orphan process. Singularity instances give you the ability to handle services properly. More on this here.
However, for whatever reason, if you would want to directly run things in the container:
singularity shell --nv tf2.sif
singularity exec --nv tf2.sif python
singularity exec --nv tf2.sif command_to_execute
To run jupyter notebook
the old-school way (without the app):
singularity exec --bind /home/username/.jupyter/tmp:/run/user \
--bind /home/username/project_folder:/jupyter \
--nv \
tf2_jupyter.sif \
jupyter notebook --notebook-dir=/jupyter --no-browser
- When starting services without instances (i.e, when working directly on the singularity image), remember to bind
--nv
and other directories via--bind
every single time. Not applicable when running on launched instances.