Skip to content

Commit

Permalink
jupyterlab working on osg via singularity container!
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Jul 6, 2022
1 parent 6601115 commit 16ba2b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tunel/apps/singularity/socket/jupyter/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ needs:
socket: true
examples:
- tunel run-app waffles singularity/socket/jupyter --container=docker://jupyter/datascience-notebook
# Run Jupyterlab login node (via Singularity container) on open science grid
- tunel run-app osg singularity/socket/jupyter --jupyterlab=true
args:
# Change jupyter container used (default is datascience notebook)
# must start with container URI to pull (e.g., docker://)
Expand Down
4 changes: 2 additions & 2 deletions tunel/apps/singularity/socket/jupyter/jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ then
# In case they don't exist yet
mkdir -p $HOME/.jupyter

printf "singularity exec --home ${HOME} --bind ${HOME}/.local:/home/jovyan/.local ${CONTAINER} jupyter notebook --no-browser --sock ${SOCKET}\n"
singularity exec {% if args.jupyterlab %}--env JUPYTER_ENABLE_LAB=yes{% endif %} --home ${HOME} --bind ${HOME}/.local:/home/jovyan/.local --bind ${HOME}/.jupyter:/home/jovyan/.jupyter "${SIF}" jupyter notebook --no-browser --sock ${SOCKET}
printf "singularity exec {% if args.jupyterlab %}--env JUPYTER_ENABLE_LAB=yes{% endif %} --home ${HOME} --bind ${HOME}/.local:/home/jovyan/.local ${CONTAINER} jupyter {% if args.jupyterlab %}lab{% else %}notebook{% endif %} --no-browser --sock ${SOCKET}\n"
singularity exec {% if args.jupyterlab %}--env JUPYTER_ENABLE_LAB=yes{% endif %} --home ${HOME} --bind ${HOME}/.local:/home/jovyan/.local --bind ${HOME}/.jupyter:/home/jovyan/.jupyter "${SIF}" jupyter {% if args.jupyterlab %}lab{% else %}notebook{% endif %} --no-browser --sock ${SOCKET}
else
printf "Singularity is not available.\n"
fi
2 changes: 1 addition & 1 deletion tunel/launcher/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def run_app(self, app):
"--output=%s.out" % render["log_output"],
"--error=%s.err" % render["log_error"],
remote_script,
] + render.get("args", [])
]

# Launch with command
if not self.previous_job_exists(app.job_name):
Expand Down

0 comments on commit 16ba2b8

Please sign in to comment.