Skip to content

The open-source AI voice studio. Clone, dictate, create.

chore(release): Docker on Python 3.12, fix numpy shim _t NameError, changelog line

jamiepine6955272e79e0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a4cacaf4..c04b3857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -63,6 +63,11 @@
### Linux
+- **The Docker image now runs on Python 3.12.** The `Dockerfile` based both build
+ stages on `python:3.11-slim` while the backend declares `>=3.12,<3.13`, so the
+ container ran an interpreter the desktop builds and `just setup` never use. Both
+ stages now use `python:3.12-slim`, matching the release workflow and the venv
+ pin above.
- **ROCm setup works on Linux AMD systems.** Docker ROCm builds now keep PyTorch
on the ROCm wheel index during dependency installation, so later installs do
not replace it with CUDA wheels. The ROCm compose overlay no longer assumes
diff --git a/Dockerfile b/Dockerfile
index adf8c7ea..14d86b9b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -32,7 +32,7 @@ RUN cd web && bunx --bun vite build
# === Stage 2: Build Python dependencies ===
-FROM python:3.11-slim AS backend-builder
+FROM python:3.12-slim AS backend-builder
# Re-declare ARG inside the stage (Docker scoping requirement).
ARG PYTORCH_VARIANT=cpu
@@ -68,7 +68,7 @@ RUN pip install --no-cache-dir --prefix=/install \
# === Stage 3: Runtime ===
-FROM python:3.11-slim
+FROM python:3.12-slim
# Create non-root user; the entrypoint joins GPU device groups at runtime.
RUN groupadd -r voicebox && \
diff --git a/backend/pyi_rth_numpy_compat.py b/backend/pyi_rth_numpy_compat.py
index 683f4dea..d682997b 100644
--- a/backend/pyi_rth_numpy_compat.py
+++ b/backend/pyi_rth_numpy_compat.py
@@ -53,17 +53,17 @@ def _patch_torch_from_numpy():
# silently corrupt data (e.g. fp16 tensors from some TTS engines),
# so we raise instead.
dtype_map = {
- "float16": _t.float16,
- "float32": _t.float32,
- "float64": _t.float64,
- "int8": _t.int8,
- "int16": _t.int16,
- "int32": _t.int32,
- "int64": _t.int64,
- "uint8": _t.uint8,
- "bool": _t.bool,
- "complex64": _t.complex64,
- "complex128": _t.complex128,
+ "float16": torch.float16,
+ "float32": torch.float32,
+ "float64": torch.float64,
+ "int8": torch.int8,
+ "int16": torch.int16,
+ "int32": torch.int32,
+ "int64": torch.int64,
+ "uint8": torch.uint8,
+ "bool": torch.bool,
+ "complex64": torch.complex64,
+ "complex128": torch.complex128,
}
def _safe_from_numpy(