Run the full DedrisGenAI app in a container — the Python+PyTorch engine and the PHP web UI.
The image is based on NVIDIA CUDA 12.4; see docker/Dockerfile,
docker/entrypoint.sh and
engine/requirements_versions.txt.
The container runs the engine internally on
127.0.0.1:7866and serves the PHP web UI on port8888(the only exposed service) — the same UI you get from the desktop launchers, not the legacy Gradio UI. Openhttp://localhost:8888once it's up.
- An NVIDIA GPU with proprietary drivers + the NVIDIA Container Toolkit
- Docker (with Compose) or Podman
From the repository root:
docker compose -f docker/docker-compose.yml up --buildThen open http://localhost:8888. The first generation downloads the selected model into the persistent volume (a few GB; one time per model).
Build (context is the repo root so both engine/ and webui/ are included):
docker build -f docker/Dockerfile -t dedrisgenai .Run:
docker run --gpus all -p 8888:8888 -v dedrisgenai-data:/content/data -it dedrisgenaipodman build -f docker/Dockerfile -t dedrisgenai .
podman run --device=nvidia.com/gpu=all -p 8888:8888 -v dedrisgenai-data:/content/data -it dedrisgenaiModels and generated images live in the dedrisgenai-data volume (mounted at /content/data).
entrypoint.sh symlinks engine/models → /content/data/models and engine/outputs →
/content/data/outputs, seeds the models folder with the small support files shipped in the image
(prompt-expansion config/tokenizer), and lets the engine download weights into the volume on first
use. The volume persists across container restarts.
| Variable | Default | Meaning |
|---|---|---|
DEDRIS_UI_PORT |
8888 |
Port the PHP UI listens on (exposed). |
DEDRIS_ENGINE_PORT |
7866 |
Internal engine port (not exposed). |
DEDRIS_HOST |
0.0.0.0 |
Bind address for the PHP UI. |
DATADIR |
/content/data |
Persistent volume location (models + outputs). |
| Path | Details |
|---|---|
/content/app |
The app (engine/ + webui/). |
/content/app/engine/models.org |
The shipped models support files; copied into the volume-backed engine/models on boot (existing files are not overwritten). |
/content/data/models |
Persistent models (symlinked to engine/models). |
/content/data/outputs |
Persistent outputs (symlinked to engine/outputs). |
git pull
docker compose -f docker/docker-compose.yml build --no-cache
docker compose -f docker/docker-compose.yml up- The model weights and the provisioned
runtimes/are excluded from the build context via.dockerignore, so the image stays lean and weights are fetched at runtime. - The MPS backend (Apple Silicon) is not supported in Docker — on a Mac use the
start.commandlauncher instead. docker compose -f docker/docker-compose.yml up -druns detached; follow logs withdocker compose -f docker/docker-compose.yml logs -f.