Skip to main content

Templates

A template is what Lium starts in your pod: a Docker image and tag, environment variables, ports, a start command and the volume path.

Pick a template​

On the Templates page: click Templates in the sidebar. My templates are yours; Browse templates shows everyone's. Pick Hopper or Blackwell to see only templates that run on that GPU generation.

On Create Pod: the Template card is pre-filled. Click × to pick another.

Templates list page with My templates and Browse templates

A Fast deploy badge marks the usual image for the chosen GPU, so the pod starts faster. Pulling an image the node doesn't have adds 1–10 minutes.

Official templates​

TemplateWhat is insidePick it when
Pytorch (Cuda + DinD)PyTorch, Python 3.12, CUDA, Docker-in-Docker, SSHTraining and inference; the default
CUDA devel (nvcc, full toolkit)nvcc and the full CUDA 13.0 toolkit, no PyTorchCompiling CUDA code or ncu profiling

Multi-node rentals use Multi-node cluster: see Clusters.

A pod started from a template (other than a one-time template) runs on its own copy of it, removed with the pod. source_template_id on the copy, and launch_snapshot.source_template_id in GET /pods/{id}/record (still readable after the pod is removed), name the original template.

Create a custom template​

Open the form

Go to Templates and click CREATE A NEW TEMPLATE. Name it and choose Private or Public.

Fill in the Configure tab

  • Start from: one click fills the image, tag and start command for a PyTorch, CUDA devel or Ubuntu base.
  • Container Image (required), e.g. pytorch/pytorch, and optionally a Tag or Digest.
  • Docker Credential: only for a private registry. Add one with + and set its Registry to the image's registry host (e.g. ghcr.io, or docker.io for Docker Hub).
  • Container Start Command: must keep the container running, e.g. end it with sleep infinity.
  • Volume: leave it at /root. Backups and restores use that path. Any other path must be absolute (e.g. /workspace) and use only letters, digits, ., _, - and /. It cannot be /mnt, /lium-cipher or a folder under them: /mnt is where an attached Volume mounts and /lium-cipher holds the encrypted data, so saving, renting, rebooting or editing a pod with such a path is refused. A public template whose path breaks this rule is taken off the template list.
  • Internal Ports: include 22 for SSH, plus any others (e.g. 8888 for Jupyter).
  • Environment Variables: KEY=value pairs. In a Public template anyone who rents it can read these values, so keep secrets out of them.

While you type, the form checks the image with its registry and shows a hint under a field to fix: a missing image or tag, a missing registry credential, no linux/amd64 build, or a start command that exits at once. You can still save.

Save

Click SAVE. The template is usable on Create Pod at once. Lium does not test-boot it, so deploy a cheap pod first and check that SSH works.

Create new template form: Configure tab fields

Edit or delete a template​

In My templates, click EDIT. Changes apply to new pods only; running pods keep the old version.

Editing a running pod's ports, image, environment or startup command on its own page restarts the pod. Only files in the pod volume (where it was first mounted; the edit dialog names the path, usually /root) and attached volumes are kept; running processes and everything else in the container are lost.

Template status​

CREATED and UPDATED mean saved, not tested. Both are ready to deploy. VERIFY_SUCCESS means a recorded deployment test passed; no automatic test runs yet, and an edit clears an earlier test. Do not wait for VERIFY_SUCCESS.

Use the API or CLI​

You need an API key.

# List all templates (yours + public)
curl https://lium.io/api/templates \
-H "X-API-Key: $LIUM_API_KEY"

# Create one
curl -X POST https://lium.io/api/templates \
-H "X-API-Key: $LIUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My PyTorch Template",
"docker_image": "pytorch/pytorch",
"docker_image_tag": "2.2.0-cuda12.1-cudnn8-runtime",
"volumes": ["/root"],
"environment": {"PYTHONUNBUFFERED": "1"},
"internal_ports": [22, 8888],
"startup_commands": "bash -c \"pip install -r /root/requirements.txt && sleep infinity\""
}'

The CLI does the same with lium templates list and lium templates create. See the lium templates reference.