11# Getting Started
22
3- This guide covers day-to-day usage with Docker Compose:
3+ This guide covers day-to-day usage with Docker Compose or Apptainer (for HPC
4+ systems where Docker is unavailable):
45
56- setting up and running the ETL
67- choosing the right container image
@@ -9,24 +10,48 @@ This guide covers day-to-day usage with Docker Compose:
910
1011## Prerequisites
1112
12- - Docker Desktop (or Docker Engine + Compose v2)
13+ - Docker Desktop (or Docker Engine + Compose v2) ** or ** Apptainer (HPC)
1314- Git submodules initialized:
1415
1516``` bash
1617git submodule update --init --recursive
1718```
1819
19- ## Choose a Docker service
20+ ## Environment variables
2021
21- | Service | Dockerfile | Base | Approx. size | Best for |
22- | ---| ---| ---| ---| ---|
23- | ` etl-dev ` | ` docker/Dockerfile.dev ` | ` python:3.11-slim ` | ~ 300 MB | Fast ETL iteration (no PhysicsNeMo/PyTorch) |
24- | ` etl ` | ` docker/Dockerfile.physicsnemo-cpu ` | ` python:3.11-slim ` | ~ 1 GB | Full CPU stack from PyPI |
25- | ` etl-ngc ` | ` docker/Dockerfile.ngc ` | ` nvcr.io/nvidia/physicsnemo/physicsnemo:25.11 ` | ~ 13 GB | NVIDIA pre-tested stack |
22+ Copy ` .env.example ` to ` .env ` and fill in values for your environment:
2623
27- All services run on Apple Silicon (` arm64 ` ) and Intel (` amd64 ` ) without a GPU.
24+ ``` bash
25+ cp .env.example .env
26+ ```
27+
28+ Key variables:
29+
30+ | Variable | Used by | Description |
31+ | ---| ---| ---|
32+ | ` APPTAINER_BIND ` | Apptainer | Default bind mounts (e.g. ` /path/to/project:/path/to/project ` ) |
33+ | ` DOCKER_PLATFORM ` | Docker Compose | Force ` linux/amd64 ` on Apple Silicon |
34+ | ` CA_CERT_DIR ` | Docker Compose | Path to directory with custom CA certs |
35+ | ` EXTRA_CA_CERT_B64 ` | Docker Compose | Base64-encoded CA cert (alternative to ` CA_CERT_DIR ` ) |
36+ | ` INSTALL_PHYSICSNEMO ` | Docker Compose (` etl ` ) | Set to ` 0 ` to skip PhysicsNeMo install |
37+ | ` UV_ALLOW_INSECURE_HOST_FLAGS ` | Docker Compose (` etl ` ) | TLS bypass for uv |
38+ | ` PIP_TRUSTED_HOST_FLAGS ` | Docker Compose (` etl-dev ` , ` etl-ngc ` ) | TLS bypass for pip |
39+ | ` HTTP_PROXY ` / ` HTTPS_PROXY ` / ` NO_PROXY ` | Both | Corporate proxy settings |
40+
41+ Docker Compose reads ` .env ` automatically. For Apptainer, see the source step
42+ in the [ Apptainer section] ( #build-and-run-with-apptainer-hpc ) below.
2843
29- ## Build and run
44+ ## Choose a container image
45+
46+ | Service | Dockerfile | Apptainer def | Base | Approx. size | Best for |
47+ | ---| ---| ---| ---| ---| ---|
48+ | ` etl-dev ` | ` docker/Dockerfile.dev ` | ` docker/dev.def ` | ` python:3.11-slim ` | ~ 300 MB | Fast ETL iteration (no PhysicsNeMo/PyTorch) |
49+ | ` etl ` | ` docker/Dockerfile.physicsnemo-cpu ` | ` docker/physicsnemo-cpu.def ` | ` python:3.11-slim ` | ~ 1 GB | Full CPU stack from PyPI |
50+ | ` etl-ngc ` | ` docker/Dockerfile.ngc ` | ` docker/ngc.def ` | ` nvcr.io/nvidia/physicsnemo/physicsnemo:25.11 ` | ~ 13 GB | NVIDIA pre-tested stack |
51+
52+ All images run on Apple Silicon (` arm64 ` ) and Intel (` amd64 ` ) without a GPU.
53+
54+ ## Build and run with Docker Compose
3055
3156### Option A: direct run from host terminal
3257
@@ -37,6 +62,70 @@ docker compose run --rm etl-dev bash -lc 'cd src && python run_etl.py --config-n
3762
3863Replace ` etl-dev ` with ` etl ` or ` etl-ngc ` if needed.
3964
65+ ## Build and run with Apptainer (HPC)
66+
67+ Use Apptainer on HPC systems where Docker is not available (e.g., INL ROD).
68+
69+ ### Step 1: Source environment variables
70+
71+ Apptainer does not read ` .env ` automatically. Source it before every session:
72+
73+ ``` bash
74+ set -a && source .env && set +a
75+ ```
76+
77+ This loads ` APPTAINER_BIND ` and any proxy settings into your shell so subsequent
78+ ` apptainer ` commands pick them up without needing ` --bind ` flags.
79+
80+ ### Step 2: Build a SIF image
81+
82+ ``` bash
83+ # Minimal dev image (ETL only, ~300 MB)
84+ apptainer build th-holo-dev.sif docker/dev.def
85+
86+ # Full CPU image with PhysicsNeMo (~1 GB)
87+ apptainer build th-holo-cpu.sif docker/physicsnemo-cpu.def
88+
89+ # NGC image with GPU support (~13 GB)
90+ apptainer build th-holo-ngc.sif docker/ngc.def
91+ ```
92+
93+ ### Step 3: Run with project folder bound
94+
95+ Bind your project directory so the container can read inputs and write outputs:
96+
97+ ``` bash
98+ apptainer run \
99+ --bind /path/to/project:/path/to/project \
100+ th-holo-cpu.sif
101+ ```
102+
103+ Your ` $HOME ` directory is auto-bound by Apptainer, so files under ` $HOME ` are
104+ always accessible without an explicit ` --bind ` .
105+
106+ ### Run a script directly
107+
108+ ``` bash
109+ apptainer exec \
110+ --bind /path/to/project:/path/to/project \
111+ th-holo-cpu.sif \
112+ bash -c ' cd /path/to/src && python run_etl.py --config-name lid_driven'
113+ ```
114+
115+ ### Set a default bind (optional)
116+
117+ To avoid typing ` --bind ` every time, export it in your shell profile:
118+
119+ ``` bash
120+ export APPTAINER_BIND=" /path/to/project:/path/to/project"
121+ ```
122+
123+ Then run without ` --bind ` :
124+
125+ ``` bash
126+ apptainer run th-holo-cpu.sif
127+ ```
128+
40129The ` lid_driven ` config is defined in ` src/moose_etl/config/lid_driven.yaml ` :
41130
42131``` yaml
0 commit comments