Usage
$ tunel run-app <server> xserver/neurodesk
Arguments
Name | Description | Split By |
---|---|---|
workdir | Working directory for app (and to show file explorer for) | NA |
container | Change the app container used (default is demo ghcr.io/neurodesk/caid/itksnap_3.8.0:20210322) | NA |
tag | Tag of the container to use (defaults to latest) | NA |
pull | force a new pull (even if the container already exists). | NA |
If split by is provided, this means the argument takes a list, and you should use this as a delimiter.
Needs
- xserver
Examples
# Run app on login node with singularity
tunel run-app waffles neurodocker
# Run app on an interactive node (also with singularity)
tunel run-app waffles neurodocker --launcher slurm
# Force a new pull
tunel run-app waffles neurodocker --pull
Scripts
app.sh
This app uses the singularity launcher by default, and supports the following:
- slurm
- singularity
#!/bin/bash
JOB_NAME="{{ jobname }}"
SCRIPT_DIR="{{ scriptdir }}"
mkdir -p ${SCRIPT_DIR}
# Sets $PORT envar from args.port then port
{% include "bash/network/set-port.sh" %}
# Include Singularity cachedir if not set
{% include "bash/singularity/set-cache-tmp.sh" %}
# Source ~/bash_profile or ~/.profile
{% include "bash/source-profile.sh" %}
# Working Directory
{% include "bash/set-workdir.sh" %}
cd $WORKDIR
echo "Job is ${JOB_NAME}"
echo "Port is ${PORT}"
echo "Working directory is ${WORKDIR}"
echo "Script directory is ${SCRIPT_DIR}"
# Create .local folder for default modules, if doesn't exist
{% include "bash/python/create-local.sh" %}
# username and password for django to create
{% include "bash/set-user-pass.sh" %}
# Load modules requested by user
{% for module in args.modules %}module load {{ module }} || printf "Could not load {{ module }}\n"
{% endfor %}
# Add variables to PATH
{% for path in paths %}export PATH={{ path }}:${PATH}
{% endfor %}
{% if docker %}{% include "templates/run_docker.sh" %}{% else %}{% include "templates/run_singularity.sh" %}{% endif %}
Have any questions, or want to request a new app or launcher? Ask us!