diff --git a/platform/ltx2-studio/README.md b/platform/ltx2-studio/README.md index ff08a9e..51713f6 100644 --- a/platform/ltx2-studio/README.md +++ b/platform/ltx2-studio/README.md @@ -71,3 +71,7 @@ Rückbau: ```sh /opt/mike-ai/rollback/ltx-rolling-extend-20260914/rollback.sh ``` + +## Robuster Neustart + +Der Chromium-Sitzungszustand liegt in einem frischen temporären Verzeichnis. Beim Start werden außerdem ausschließlich die veralteten Electron-Sperren SingletonCookie, SingletonLock und SingletonSocket aus /data/LTXDesktop entfernt. Damit startet derselbe Container nach einem Profilwechsel erneut, ohne mit Exit 133 abzubrechen. Modelle, Einstellungen, Hugging-Face-Anmeldung, Eingaben und Ergebnisse bleiben dauerhaft unter /data/LTXDesktop erhalten. diff --git a/platform/ltx2-studio/compose.yaml b/platform/ltx2-studio/compose.yaml index b059456..7015ec8 100644 --- a/platform/ltx2-studio/compose.yaml +++ b/platform/ltx2-studio/compose.yaml @@ -34,6 +34,7 @@ services: - 127.0.0.1:41955:41955 volumes: - /data/video/ltx-desktop:/data + - /opt/mike-ai/stack/platform/ltx2-studio/entrypoint.sh:/usr/local/bin/ltx-desktop-entrypoint:ro - /etc/mike-ai/secrets/ltx-remote-token:/run/secrets/ltx-remote-token:ro - /opt/mike-ai/stack/platform/ltx2-studio/remote-app_factory.py:/opt/ltx-desktop/squashfs-root/resources/backend/app_factory.py:ro - /opt/mike-ai/stack/platform/ltx2-studio/prompt_enhancement_handler.py:/opt/ltx-desktop/squashfs-root/resources/backend/handlers/prompt_enhancement_handler.py:ro diff --git a/platform/ltx2-studio/entrypoint.sh b/platform/ltx2-studio/entrypoint.sh old mode 100644 new mode 100755 index 8623924..17e4643 --- a/platform/ltx2-studio/entrypoint.sh +++ b/platform/ltx2-studio/entrypoint.sh @@ -11,6 +11,13 @@ 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 + +# Keep Chromium session data ephemeral. LTX models, settings, authentication and +# outputs remain in /data/LTXDesktop through XDG_DATA_HOME. +rm -rf /tmp/ltx-electron-profile +# Electron keeps its single-instance markers in the persistent LTX data path. +# They point at the stopped container and must not survive a profile switch. +rm -f /data/LTXDesktop/SingletonCookie /data/LTXDesktop/SingletonLock /data/LTXDesktop/SingletonSocket Xvfb :0 -screen 0 1600x1000x24 -nolisten tcp & x_pid=$! for _ in $(seq 1 50); do @@ -29,7 +36,7 @@ web_pid=$! export APPDIR=/opt/ltx-desktop/squashfs-root cd "$APPDIR" ./AppRun --no-sandbox --disable-gpu-sandbox \ - --disable-dev-shm-usage >/data/ltx-desktop.log 2>&1 & + --disable-dev-shm-usage --user-data-dir=/tmp/ltx-electron-profile >/data/ltx-desktop.log 2>&1 & app_pid=$! wait "$app_pid"