Skip to main content

Ephemeral Containers

Why containers are temporary, and why that's a feature.


The Core Idea

Containers = temporary compute sessions Workspaces = permanent storage

Like shutting down your laptop when done - your files are safe on the disk.


The DS01 Workflow

# Need GPU? Spin up a container
project launch my-thesis --open

# Do your compute-intensive work
# (files saved to /workspace/)

# Done? Clean up
exit
container retire my-thesis # Frees GPU for others
# Need GPU again later? Spin up another container
project launch my-thesis --open
# All your files are exactly where you left them

Container is new. Workspace files persist.


What's Temporary vs Permanent

Temporary (lost on retire):

  • Container instance, running processes, pip packages, files outside /workspace/, GPU allocation

Permanent (always safe):

  • Files in /workspace/, Dockerfile, Docker images, Git history on host

Quick Commands

# Deploy (create + start)
project launch my-project

# Retire (stop + remove + free GPU)
container retire my-project

# Check what you have running
container-list

Mental Model

Think of it like a laptop:

LaptopDS01
Shut down when donecontainer retire
Files on SSDFiles in /workspace/
Boot takes 30 secDeploy takes 30 sec

Common Questions

"Will I lose work?"

No, if you save to /workspace/. That's the whole point of the workspace.

"How long does recreating take?"

About 30 seconds. Image is already built.

"What if I need a GPU for 3 days?"

Keep the container running. Retire when actually done.

"What if container stops unexpectedly?"

Load your checkpoint and resume. Save progress frequently.


Want Deeper Understanding?

This is a brief introduction to the ephemeral model. For comprehensive explanation of:

  • Why this design (fairness, reproducibility, industry standards)
  • How to handle long-running jobs and checkpointing
  • When to use different strategies
  • Industry context (AWS, Kubernetes, HPC)

See Ephemeral Philosophy in Educational Computing Context (20 min read).


Next Steps