diff --git a/platform/ltx2-studio/Dockerfile b/platform/ltx2-studio/Dockerfile index c303acb..35c223a 100644 --- a/platform/ltx2-studio/Dockerfile +++ b/platform/ltx2-studio/Dockerfile @@ -21,7 +21,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins && ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html COPY entrypoint.sh /usr/local/bin/ltx-desktop-entrypoint -RUN chmod 0755 /usr/local/bin/ltx-desktop-entrypoint +COPY tar-no-owner.sh /usr/local/bin/tar +RUN chmod 0755 /usr/local/bin/ltx-desktop-entrypoint /usr/local/bin/tar ENV DISPLAY=:0 \ HOME=/data/home \ diff --git a/platform/ltx2-studio/README.md b/platform/ltx2-studio/README.md index aa8a3d1..453d853 100644 --- a/platform/ltx2-studio/README.md +++ b/platform/ltx2-studio/README.md @@ -14,3 +14,7 @@ The RTX 5080 has the official minimum of 16 GiB VRAM for LTX Desktop local generation. Start with LTX Fast, 720p or below and at most about ten seconds. Model downloads may require accepting Lightricks' model license and signing in to Hugging Face in the application. + +The image installs a narrow `tar` wrapper that ignores uid/gid metadata in the +official first-run Python archive. This keeps `cap_drop: [ALL]` intact while +allowing the archive, whose entries belong to build user 1001, to be extracted. diff --git a/platform/ltx2-studio/compose.yaml b/platform/ltx2-studio/compose.yaml index 3a57003..2b031f5 100644 --- a/platform/ltx2-studio/compose.yaml +++ b/platform/ltx2-studio/compose.yaml @@ -10,11 +10,19 @@ services: restart: "no" labels: com.mike-ai.video-worker: ltx2 - gpus: all + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: + - ${LTX2_GPU_UUID:-GPU-8ad38c6c-5a01-9d8e-1dfa-ed662ad78fbe} + capabilities: [gpu] shm_size: 8g environment: NVIDIA_VISIBLE_DEVICES: ${LTX2_GPU_UUID:-GPU-8ad38c6c-5a01-9d8e-1dfa-ed662ad78fbe} NVIDIA_DRIVER_CAPABILITIES: compute,utility,graphics + CUDA_VISIBLE_DEVICES: "0" volumes: - /data/video/ltx-desktop:/data networks: diff --git a/platform/ltx2-studio/entrypoint.sh b/platform/ltx2-studio/entrypoint.sh index 338f237..8623924 100644 --- a/platform/ltx2-studio/entrypoint.sh +++ b/platform/ltx2-studio/entrypoint.sh @@ -8,6 +8,9 @@ cleanup() { } trap cleanup EXIT INT TERM +# A stopped container keeps its writable layer. Remove stale X11 state so the +# same container can be started again by the profile controller. +rm -f /tmp/.X0-lock /tmp/.X11-unix/X0 Xvfb :0 -screen 0 1600x1000x24 -nolisten tcp & x_pid=$! for _ in $(seq 1 50); do diff --git a/platform/ltx2-studio/tar-no-owner.sh b/platform/ltx2-studio/tar-no-owner.sh new file mode 100644 index 0000000..0b46f24 --- /dev/null +++ b/platform/ltx2-studio/tar-no-owner.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# LTX Desktop's Linux Python archive carries its build-host uid/gid. The +# container deliberately drops CAP_CHOWN, so ignore archive ownership while +# retaining all paths, modes and contents. +exec /usr/bin/tar --no-same-owner "$@"