Fix LTX Desktop restart after profile switches
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Regular → Executable
+8
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user