Docker image + web UI for Lilgeneric/UniRelight on NVIDIA Blackwell (SM_120).
| Base | nvidia/cuda:12.9.0-devel-ubuntu24.04 |
| Python | 3.10 |
| CUDA / Torch | 12.9 / 2.12.1+cu129 |
| UI | http://localhost:8080 |
This stack does not recreate the upstream CUDA 12.4 / Torch 2.6 conda env. See DEPENDENCY_DEVIATIONS.md.
For a new machine with an NVIDIA GPU (Blackwell / SM_120 recommended). Commands below are PowerShell; on Linux/macOS use the same docker / docker compose lines (and ./build.sh instead of .\build.ps1).
- NVIDIA driver recent enough for CUDA 12.9
- Docker Desktop (Windows/macOS) or Docker Engine + Compose plugin (Linux)
- NVIDIA Container Toolkit so containers see the GPU (
docker run --rm --gpus all nvidia/cuda:12.9.0-base-ubuntu24.04 nvidia-smishould work) - Disk space: ~40+ GB for the image, plus ~30 GB for model weights
- Hugging Face access for checkpoint download (login if the repo requires it)
cd E:\Dockerbuilds\uniRelight # or wherever you cloned / copied this repomkdir -Force data\input, data\hdri, data\outputs, data\checkpoints, data\models, data\jobs, data\frames
docker volume create unirelight-hf-cacheThis builds unirelight-blackwell:cu129 (CUDA, Python 3.10, PyTorch cu129, TE, etc.). Expect a long first build (often an hour+).
.\build.ps1 -MaxJobs 8Linux:
./build.shCompose layers the UI/entrypoint on top of that runtime image → unirelight-blackwell:cu129-web.
docker compose buildWeights are not inside the image; they land under ./data/checkpoints on the host (~27 GB+).
docker compose run --rm unirelight bash -lc "python scripts/download_unirelight_checkpoints.py --checkpoint_dir /data/checkpoints"Confirm:
data/checkpoints/UniRelight/model.pt
data/checkpoints/Cosmos-Tokenize1-CV8x8x8-720p/mean_std.pt
docker compose up -d- Status should become healthy;
/healthzreturns"ok": trueand"ckpt_ready": true - Empty
data/input/data/hdrimay be seeded with example assets on first start - Or upload your own video / frame folder and HDRI in the UI
In the UI:
- Select a video or frame folder
- Select an HDRI
- Pick resolution (default
848 × 480) - Leave outputs as Relit + Albedo (or enable PNG sequence / rotate light)
- Press Execute
While the job runs, the right panel shows live logs:
When it finishes you get separate albedo and relit previews (and matching files under data/outputs/<job-id>/):
docker compose down./data and the HF volume are kept. Next time: docker compose up -d.
| Change | Command |
|---|---|
| Start UI again | docker compose up -d |
| UI / entrypoint / patches only | docker compose build && docker compose up -d |
| Full Torch/CUDA stack change | .\build.ps1 then docker compose build && docker compose up -d |
Host folders under ./data are bind-mounted into the container. Deleting the container does not delete models or outputs.
data/
input/ # videos (.mp4) or frame folders (…/00000.rgb.png)
hdri/ # environment maps (.hdr / .exr)
outputs/ # relight results (.mp4 and optional PNG sequences)
checkpoints/ # UniRelight + Cosmos tokenizer weights
models/ # optional extra models
jobs/ # job logs (created by the UI)
frames/ # extracted frames cache (created by the UI)
docker-compose.yml mounts each subfolder explicitly so host files are not shadowed by anonymous Docker volumes.
Hugging Face cache: named volume unirelight-hf-cache (see step 2 above).
| Port | Service |
|---|---|
8080 |
Web UI + API (/, /api/*, /healthz) |
Change mapping in docker-compose.yml ("8080:8080") or set UNIRELIGHT_PORT.
docker compose run --rm unirelight bash
python -m cosmos_predict1.diffusion.inference.single_gpu_relight `
--config_file cosmos_predict1/diffusion/training/config/config_relight.py `
--config unirelight_cosmos_f57_480p `
--ckpt_path /data/checkpoints/UniRelight/model.pt `
--dataset_name /data/frames/<dataset> `
--output_path /data/outputs/manual `
--sample_n_frames 57 `
--env_light_path /data/hdri/warm_bar_2k.hdr `
--resolution 480 848 `
--resize_resolution 486 864 `
--save_condition false `
--output_panels relit albedo--output_panels accepts any of: relit, albedo, input, comparison, condition.
Default (patched image) is separate relit + albedo files — not a side-by-side.
GPU smoke test:
docker compose run --rm unirelight python /usr/local/bin/validate_runtime.py- PyTorch cu129 instead of Torch 2.6 / CUDA 12.4
- Transformer Engine 2.x shim — re-exports
apply_rotary_pos_embfor Cosmos imports - nvdiffrast installed with
--no-build-isolation(required for HDR projection) - ffmpegcv for Cosmos video helpers
- Real example assets fetched from GitHub LFS media URLs (shallow clones only have pointer files)
--output_panelspatch — export separate relit/albedo (upstream always wrote a side-by-side)
GET /api/assets— list videos / HDRIsPOST /api/upload/video·POST /api/upload/hdri·POST /api/upload/framesPOST /api/jobs— start relight (video_id,hdri_id,resolution,output_panels[],save_images,rotate_light, …)GET /api/jobs/{id}·GET /api/jobs/{id}/logGET /api/outputs/{id}/…


