aboutsummaryrefslogtreecommitdiffstats
path: root/compose.yaml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-08 16:09:38 +0200
committerDanilo M. <danix@danix.xyz>2026-07-08 16:09:38 +0200
commit86429718fa045d9c69b0db7e46630496c86e51b4 (patch)
treec580d83262d9be0e6ef78213e6e86855af644b96 /compose.yaml
parent25d5bb44c2f4acc76ac6b56b1a8db556b9c4eb51 (diff)
downloadimggen-86429718fa045d9c69b0db7e46630496c86e51b4.tar.gz
imggen-86429718fa045d9c69b0db7e46630496c86e51b4.zip
Add compose service (runs as host user) and .env.example
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'compose.yaml')
-rw-r--r--compose.yaml20
1 files changed, 20 insertions, 0 deletions
diff --git a/compose.yaml b/compose.yaml
new file mode 100644
index 0000000..c0f7ba1
--- /dev/null
+++ b/compose.yaml
@@ -0,0 +1,20 @@
+services:
+ imggen:
+ build: .
+ image: imggen:local
+ user: "${IMGGEN_UID:-1000}:${IMGGEN_GID:-100}"
+ group_add:
+ - video # gid for /dev/dri/card* access as non-root
+ devices:
+ - /dev/dri
+ volumes:
+ - ${IMGGEN_OUT:-./out}:/out
+ - ${IMGGEN_CACHE:-./models}:/models
+ environment:
+ - HF_HOME=/models
+ - IMGGEN_MODEL=${IMGGEN_MODEL:-sdxl}
+ - IMGGEN_PORT=${IMGGEN_PORT:-8765}
+ ports:
+ - "127.0.0.1:${IMGGEN_PORT:-8765}:8765"
+ entrypoint: ["python3"]
+ command: ["server.py"]