Skip to main content

Use Lium with SkyPilot (SSH Node Pools)

SkyPilot runs AI jobs from one task file on many kinds of infrastructure. Its SSH Node Pools feature runs those jobs on machines you already have. A rented Lium pod can be that machine.

This page covers one pod, with the SkyPilot client inside the same pod. Every command below was run in this order on 29 Nov 2026 (SkyPilot 0.14.3, an RTX 5060 Ti pod, Ubuntu 24.04). The last step ran a GPU job that ended with Job finished (status: SUCCEEDED).

What you need​

  • A pod with more than 1 GiB of RAM. On a pod with 1 GiB, the SkyPilot API server exits on start (SkyPilot API server process exited unexpectedly). The pod that worked in the test had 22 GiB.
  • A GPU template on Ubuntu. The test used the PyTorch (CUDA + DinD) template on Ubuntu 24.04. See Create a pod.
  • An SSH session on the pod as root. See SSH keys.

Run everything below on the pod.

1. Install SkyPilot and kubectl​

python3 -m venv /root/skyenv
/root/skyenv/bin/pip install -q --upgrade pip
/root/skyenv/bin/pip install -q "skypilot[kubernetes]==0.14.3"
/root/skyenv/bin/sky --version

curl -fsSLo /usr/local/bin/kubectl https://dl.k8s.io/release/v1.31.4/bin/linux/amd64/kubectl
chmod +x /usr/local/bin/kubectl

2. Let SkyPilot reach the pod over SSH​

SSH Node Pools connect to each node over SSH. Here the node is the pod itself, so give SkyPilot a key for the root user on 127.0.0.1:

mkdir -p /root/.ssh /root/.sky
ssh-keygen -t ed25519 -N "" -f /root/.ssh/selfkey -q
cat /root/.ssh/selfkey.pub >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
ssh -i /root/.ssh/selfkey -o StrictHostKeyChecking=no -o BatchMode=yes -l root 127.0.0.1 hostname

Then describe the pool in ~/.sky/ssh_node_pools.yaml:

lium-pool:
hosts:
- 127.0.0.1
user: root
identity_file: /root/.ssh/selfkey

3. Run sky ssh up, then start k3s by hand​

/root/skyenv/bin/sky ssh up --infra lium-pool

The first run installs k3s, the Kubernetes runtime that SSH Node Pools use, and then fails with Failed to read the k3s join token from the head node. The k3s installer writes a systemd unit, but a Lium pod does not run systemd, so k3s never starts. Start it by hand and wait for the node to be Ready (86 seconds in the test):

nohup /usr/local/bin/k3s server --write-kubeconfig-mode 644 > /root/k3s-manual.log 2>&1 &
sleep 90
/usr/local/bin/k3s kubectl get nodes

Copy the k3s kubeconfig to where SkyPilot looks for it, then run sky ssh up again:

mkdir -p /root/.kube
cp /etc/rancher/k3s/k3s.yaml /root/.kube/config
timeout 900 /root/skyenv/bin/sky ssh up --infra lium-pool

It prints SkyPilot runtime is up [lium-pool] and then waits for the NVIDIA GPU operator, which cannot start until step 4, so the command does not return by itself. Once you see SkyPilot runtime is up, press Ctrl+C (or let the timeout stop it, as in the test) and go to step 4.

4. Install socat and nc, and make the root mount shared​

The GPU operator pods stay in Init:CreateContainerError with path "/" is mounted on "/" but it is not a shared or slave mount. sky check ssh also needs socat and nc. Fix both, then restart the GPU operator pods:

DEBIAN_FRONTEND=noninteractive apt-get update -q
DEBIAN_FRONTEND=noninteractive apt-get install -y -q socat netcat-openbsd
mount --make-rshared /
/usr/local/bin/k3s kubectl -n gpu-operator delete pods --all --wait=false
sleep 180
/usr/local/bin/k3s kubectl get pods -A

Every gpu-operator pod should be Running (the validator shows Completed). The node then lists one allocatable nvidia.com/gpu.

5. Check the pool and find the GPU name​

/root/skyenv/bin/sky check ssh
/root/skyenv/bin/sky gpus list --infra ssh/lium-pool

sky check ssh should show lium-pool: enabled. Use the GPU name exactly as sky gpus list prints it. In the test that was RTX5060-TI; RTX5060Ti gave No resource satisfying.

6. Launch a job​

cat > /root/task.yaml <<'YAML'
run: nvidia-smi
YAML

/root/skyenv/bin/sky launch -y -c t3 --infra ssh/lium-pool --gpus RTX5060-TI:1 /root/task.yaml
/root/skyenv/bin/sky status
/root/skyenv/bin/sky down -y t3

In the test, SkyPilot considered SSH (lium-pool) 4 vCPU 16 GB RTX5060-TI:1 and the job ended with Job finished (status: SUCCEEDED). Replace RTX5060-TI with the name your pod shows.

When you are done, copy off anything you want to keep first: deleting the pod deletes everything on it, including /root (the SkyPilot install, the pool file and your task files). Only a Volume mounted at /mnt keeps its data after the pod is deleted.

Then delete the pod on Lium. Charging stops when you delete the pod, not when the SkyPilot job ends (see Billing).

What this page does not cover​

  • Several pods in one pool. Tested on one pod only, with the client inside it. Ordinary pods expose TCP port maps, and a second k3s node would need ports a pod does not expose. For multi-machine jobs, see Multi-node clusters.
  • A pod restart. Not tested: whether k3s has to be started by hand again after the pod restarts.
  • A SkyPilot client on your own computer. Not tested: running sky off the pod against a pool on it.