diff --git a/vertex_pipelines/Dockerfile b/vertex_pipelines/Dockerfile index c82061a..98e6bc4 100644 --- a/vertex_pipelines/Dockerfile +++ b/vertex_pipelines/Dockerfile @@ -8,16 +8,24 @@ WORKDIR /app RUN apt-get update && apt-get install -y curl build-essential RUN curl -LsSf https://astral.sh/uv/install.sh | sh RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}" +# Add uv, cargo, and the future venv bin to the PATH +ENV PATH="/root/.local/bin:/root/.cargo/bin:/app/.venv/bin:${PATH}" # Copy the entire project into the Docker image. COPY . . +# Create a virtual environment. +RUN uv venv + # Install Python dependencies using uv. -RUN /root/.local/bin/uv sync --extra gpu +RUN uv sync --extra gpu + +# Install maturin, which is a build dependency. +RUN uv pip install maturin # Build the rustbpe tokenizer. -RUN /root/.local/bin/uv run maturin develop --release --manifest-path rustbpe/Cargo.toml --uv +# The maturin executable from the venv should be on the PATH now. +RUN maturin develop --release --manifest-path rustbpe/Cargo.toml # Set the entrypoint. ENTRYPOINT ["python"]