From 15b631f33f4453bdddef8c5976980a232fe76414 Mon Sep 17 00:00:00 2001 From: Pierre De Lancre Date: Fri, 30 Oct 2026 15:43:40 +0300 Subject: [PATCH] =?UTF-8?q?ops:=20launcher=20fixes=20=E2=80=94=20uv=20pyth?= =?UTF-8?q?on=203.12=20pin,=20cu126=20index=20(torch>=3D2.6),=20port=20def?= =?UTF-8?q?ault=208484,=20pip=5Finto=20helper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chamber | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/chamber b/chamber index a317643..488e75d 100755 --- a/chamber +++ b/chamber @@ -12,7 +12,7 @@ set -euo pipefail cd "$(dirname "$0")" -PORT="${CHAMBER_PORT:-8000}" +PORT="${CHAMBER_PORT:-8484}" HOST="${CHAMBER_HOST:-127.0.0.1}" DEVICE="auto" @@ -31,20 +31,34 @@ PIDFILE=".chamber.pid" have_nvidia() { command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi -L >/dev/null 2>&1; } +pip_into() { + if command -v uv >/dev/null 2>&1; then + uv pip install --quiet --python .venv/bin/python "$@" + else + .venv/bin/pip install --quiet "$@" + fi +} + install_venv() { if [[ ! -x .venv/bin/python ]]; then - python3 -m venv .venv + # torch has no wheels for bleeding-edge pythons; prefer uv-pinned 3.12 + if command -v uv >/dev/null 2>&1; then + echo "[chamber] uv found -> venv with python 3.12" + uv venv --python 3.12 .venv + else + python3 -m venv .venv + fi echo "[chamber] venv created" fi if have_nvidia && [[ "$DEVICE" != "cpu" ]]; then echo "[chamber] NVIDIA detected -> installing CUDA torch (big download)" - .venv/bin/pip install --quiet "torch" --index-url https://download.pytorch.org/whl/cu121 + pip_into "torch" --index-url https://download.pytorch.org/whl/cu126 else echo "[chamber] CPU mode -> installing CPU torch" - .venv/bin/pip install --quiet "torch" --index-url https://download.pytorch.org/whl/cpu + pip_into "torch" --index-url https://download.pytorch.org/whl/cpu fi # requirements.txt pins cpu-index torch on its own line; install the rest - grep -v '^torch' live/requirements.txt | .venv/bin/pip install --quiet -r /dev/stdin + grep -v '^torch' live/requirements.txt | pip_into -r /dev/stdin echo "[chamber] deps installed" }