Skip to content

Proxy

On some HPC clusters, compute nodes are isolated from the public internet. Therefore, workflows that need network access, such as downloading reference data or running pip install during interactive exploration, will fail when executed as cluster jobs.

CondaTainer solves this by running a proxy on the login node and routing outbound network traffic from your compute nodes through it.

How a compute node job reaches the internet A compute node has no direct route to the internet. A job on it sends its traffic to a proxy that runs on the login node, using the http_proxy and all_proxy variables. The proxy uses an SSH tunnel to the login node to send it out to the internet. Compute node Your job condatainer run Login node Proxy SOCKS5 and HTTP Internet packages, downloads no route out http_proxy outbound

A shared proxy runs as a background service on the login node. Once started, it can route traffic for all running jobs.

condatainer proxy start # Starts the proxy on a free port
condatainer proxy start -p 13200 # Starts the proxy on a specific port
condatainer proxy status # Checks if the proxy is active and shows address
condatainer proxy stop # Stops the proxy service

Key details:

  • Once started, the proxy remains active and serves any job you submit.
  • Process Lingering: Many clusters automatically terminate user processes when you log out. condatainer proxy start attempts to enable loginctl lingering so the proxy survives SSH disconnects.

Prerequisites:

  • Network reachability: The port on the login node must be accessible from the cluster’s compute nodes.
  • Passwordless SSH: Passwordless SSH connection between nodes on the cluster.

If you prefer an isolated proxy that only runs during the lifetime of a specific task, you can use a per-job proxy. The job starts its own tunnel back to the login node, and the tunnel shuts down when the job completes.

Choose which jobs get one with the scheduler.proxy_per_job setting. It is empty by default, so no job gets a proxy.

ValueJobs that get a proxy
createcondatainer create and condatainer project restore
runcondatainer run
helpercondatainer helper run
allAll of the above
condatainer config append scheduler.proxy_per_job all # every kind of job
condatainer config append scheduler.proxy_per_job run # one kind; repeat to add more

Requirement: Passwordless SSH connection from compute nodes back to the login node.

For commands: condatainer run and condatainer exec, CondaTainer automatically configures standard proxy environment variables inside the container: http_proxy, https_proxy, all_proxy, no_proxy and their upper-case forms.

Any tools running inside the container (including package managers like pip and curl) will pick up these variables automatically.

If you want to use proxy outside of CondaTainer:

condatainer proxy start --via <login-node>
source <(condatainer proxy export)

proxy export prints nothing when no proxy is active.