Helper Scriptsο
Helper scripts launch interactive web applications (VS Code, RStudio, Jupyter, desktop VNC) inside CondaTainer. They run on both HPC clusters (via scheduler job submission) and headless servers (directly).
How It Worksο
When you run condatainer helper ..., a local CondaTainer server is auto-started on the current machine (login node or server). This server:
Connects to helper services running on compute nodes
Exposes a web dashboard at
http://localhost:<server-port>/β (start, stop, configure helpers)Gives each helper session its own URL:
http://<session-id>.localhost:<server-port>/
You forward one port for the CondaTainer server β no per-helper port juggling.
Your Browser β http://<id>.localhost:<server-port>/
β SSH port forward (one-time setup)
CondaTainer server (login/server node)
β (automatic)
Helper service (compute node or same server)
Prerequisitesο
Install CondaTainerο
curl -fsSL https://get-condatainer.justype.net | bash
Download Helper Scriptsο
condatainer helper -u
SSH Port Forwardingο
Set up a single LocalForward for the CondaTainer server port. The server prints its port on first start; you can also check it with condatainer server status.
# HPC is a shared system, do not use common port like 8080, 8787
Host hpc
HostName hpc.university.edu
User your_username
LocalForward 13182 localhost:13182
To use a fixed port, start the server once with -p β the choice is saved for all future starts:
condatainer server start -p 13182
Then set your LocalForward to that port. Everything else is handled automatically.
Tip
Add the following at the end of your local ~/.ssh/config to prevent idle timeouts while working in the browser:
Host *
ServerAliveInterval 60
ServerAliveCountMax 5
Note
The server exits when your SSH session ends. This is by design: on HPC systems with multiple login nodes, the server must run on the same node your SSH tunnel lands on. Tying the server to the SSH session ensures it is always reachable through your forwarded port.
To resume after reconnecting, simply run any helper command or restart the server explicitly:
condatainer server start # restart the server
condatainer helper # or just run a helper β it auto-starts the server
If you want the server to survive logout, start it with --daemon:
condatainer server start --daemon
HPC Schedulerο
On HPC clusters, helpers submit batch jobs. Verify your scheduler is detected:
condatainer scheduler
Slurm is fully tested. PBS, LSF, and HTCondor are experimentally supported.
Clusters Without Inter-Node SSHο
If your cluster does not allow SSH between nodes, enable helper_bind_all:
condatainer config set helper_bind_all true
Helper services will then bind to all interfaces on the compute node. The compute node must be reachable from the login node for this to work.
Quick Startο
# Update helpers
condatainer helper -u
# Run a helper (submits scheduler job on HPC, runs directly on a server)
# CondaTainer server auto-starts on first run and prints the access URL
condatainer helper vscode-server
On a headless server without a scheduler, use --local:
condatainer --local helper -u
condatainer --local helper vscode-server
Or set submit_job: false in your CondaTainer config to make headless mode permanent.
Flagsο
Resource Flagsο
These control the scheduler job resources on HPC. They have no effect in headless mode.
Flag |
Description |
Default |
|---|---|---|
|
CPUs per job |
(helper default) |
|
Memory |
(helper default) |
|
Walltime |
(helper default) |
|
GPU spec (e.g. |
none |
Pass -g '' to explicitly clear a saved GPU setting.
Overlay Flagsο
These apply in all modes (HPC and headless).
Flag |
Description |
|---|---|
|
Override base image |
|
Writable overlay (default: |
|
Additional read-only overlay (repeatable) |
|
Set working directory (e.g. |
|
Skip reuse prompt, force new session |
When -e is env.img (the default), the helper searches in order:
env.img(current directory)overlay/env.imgsrc/overlay/env.img
Helper-Specific Flagsο
Each helper may define its own flags (e.g. --rversion for rstudio-server, --vnc for xfce4). View them with:
condatainer helper <name> --help
Configurationο
Helpers save your preferences to ~/.config/condatainer/helper/<name> (or $XDG_CONFIG_HOME/condatainer/helper/<name>).
# View saved config and available keys
condatainer helper vscode-server config
# Set a value
condatainer helper vscode-server config set NCPUS 8
# View raw config file
condatainer helper vscode-server config show
Config files use KEY="VALUE" format and can be edited directly. The next run picks up any changes.
Session Historyο
When you run a helper, CondaTainer shows your recent sessions (up to 5, deduplicated by working directory) and lets you pick one:
Recent vscode-server sessions:
1. /scratch/user/project-a 4c 32G [RUNNING] started 2h ago
β http://<id>.localhost:13182/...
2. /scratch/user/project-b 4c 16G last used 1d ago
3. /scratch/user/project-c 8c 64G last used 3d ago
n. Start new
[?] Choose [1/2/3/n]:
Picking a running session prints its access URL and exits. Picking a past session reuses its settings (working directory, resources, overlays) for the new job. Choose n to start fresh with config defaults and the current directory.
Pass --new to skip the session picker and go straight to this prompt with fresh defaults.
Settings Confirmationο
Before submitting a new job, CondaTainer prints all current settings and lets you edit them inline:
[CNT] Settings:
c: 4 CPUs m: 16G Memory t: 12:00:00 Walltime g: (none) GPU
w: /scratch/user/project-a Working directory
e: env.img Writable overlay (.img)
r: 4.5.2 R version
[Enter to continue, or key value to update]:
Type key value to update a field before submitting (e.g. c 8, g h100:1, r 4.4, w /scratch/project), then press Enter on an empty line to proceed.
Use - to clear a field (e.g. e - to run without a writable overlay, g - to clear GPU, o - to clear extra overlays). For o, the value replaces the entire overlay list β space-separate multiple names (e.g. o build-essential extra-deps).
Available Applicationsο
Helper |
Description |
Guide |
|---|---|---|
|
Full VS Code in browser |
|
|
Full VS Code via Microsoft relay (no port forwarding) |
|
|
Open-source VS Code (Open VSX extensions only) |
|
|
RStudio with Posit R image overlays |
|
|
RStudio with Conda-managed R |
|
|
Jupyter Lab |
β |
|
XFCE desktop via VNC, browser-accessible |
|
|
XFCE desktop with IGV pre-launched |
|
|
XFCE desktop with Cytoscape pre-launched |