diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database index 53189520a6c..4e9e71fc508 100644 --- a/docker/Dockerfile.database +++ b/docker/Dockerfile.database @@ -16,17 +16,26 @@ RUN apk add --no-cache \ bash \ gcc \ git \ + curl \ + build-base \ openssl \ openssl-dev -RUN python -m pip install build +RUN python -m pip install --upgrade pip setuptools && \ + python -m pip install build wheel cmake setuptools_rust maturin # Install build dependencies needed for git-based packages RUN pip install --no-cache-dir hatchling hatch-vcs +# Configure Rust environment for building Rust-backed Python wheels (tiktoken, etc.) +ENV CARGO_HOME=/root/.cargo +ENV PATH=/root/.cargo/bin:$PATH # Allow forward-compatible ABI for PyO3-based packages on Python 3.14 ENV PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ + rustup default stable + # Copy the current directory contents into the container at /app COPY . . diff --git a/docker/Dockerfile.non_root b/docker/Dockerfile.non_root index 81630c44f54..f9b96ec85ed 100644 --- a/docker/Dockerfile.non_root +++ b/docker/Dockerfile.non_root @@ -19,17 +19,24 @@ RUN for i in 1 2 3; do \ lld \ gcc \ git \ + curl \ linux-headers \ build-base \ bash \ nodejs \ npm && break || sleep 5; \ done \ - && python -m pip install --no-cache-dir --upgrade pip build + && python -m pip install --no-cache-dir --upgrade pip setuptools build wheel cmake setuptools_rust maturin +# Configure Rust environment for building Rust-backed Python wheels (tiktoken, etc.) +ENV CARGO_HOME=/root/.cargo +ENV PATH=/root/.cargo/bin:$PATH # Allow forward-compatible ABI for PyO3-based packages on Python 3.14 ENV PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ + rustup default stable + # Cache Python dependencies COPY requirements.txt .