fix(docker): use python@3.14 and d/l models to shared dir (#78)

This commit is contained in:
Tobias Fried
2026-05-26 10:51:45 -06:00
committed by GitHub
parent e129da7cd1
commit 5d1074eee8
+6 -2
View File
@@ -1,9 +1,9 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# Use the official UV Python base image with Python 3.13 on Debian Bookworm # Use the official UV Python base image with Python 3.14 on Debian Bookworm
# UV is a fast Python package manager that provides better performance than pip # UV is a fast Python package manager that provides better performance than pip
# We use the slim variant to keep the image size smaller while still having essential tools # We use the slim variant to keep the image size smaller while still having essential tools
ARG PYTHON_VERSION=3.13 ARG PYTHON_VERSION=3.14
FROM ghcr.io/astral-sh/uv:python${PYTHON_VERSION}-bookworm-slim AS base FROM ghcr.io/astral-sh/uv:python${PYTHON_VERSION}-bookworm-slim AS base
# Keeps Python from buffering stdout and stderr to avoid situations where # Keeps Python from buffering stdout and stderr to avoid situations where
@@ -15,6 +15,10 @@ ENV PYTHONUNBUFFERED=1
# expense of a slightly longer build. # expense of a slightly longer build.
ENV UV_COMPILE_BYTECODE=1 ENV UV_COMPILE_BYTECODE=1
# Ensure local models are downloaded to a shared directory accessible by all stages.
ENV HF_HOME=/app/.cache/huggingface
ENV TORCH_HOME=/app/.cache/torch
# --- Build stage --- # --- Build stage ---
# Install dependencies, build native extensions, and prepare the application # Install dependencies, build native extensions, and prepare the application
FROM base AS build FROM base AS build