Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.venv
.git
**/__pycache__
**/*.pyc
/checkpoints
/datasets
/output
Expand Down
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ WORKDIR /workspace
# Install python
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=.python-version,target=.python-version \
uv python install
uv python install && \
chmod 0711 /root

# Install into virtual environment
RUN echo "$CUDA_VERSION" | sed -E 's/^([0-9]+)\.([0-9]+).*/cu\1\2/' > /root/.cuda-name
Expand All @@ -49,9 +50,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
--mount=type=bind,source=.python-version,target=.python-version \
--mount=type=bind,source=packages,target=packages \
uv sync --locked --no-install-project --no-editable --all-extras --group=$(cat /root/.cuda-name) --group=vllm
uv sync --locked --no-install-project --no-editable --all-extras --group=$(cat /root/.cuda-name)-train
ENV PATH="/workspace/.venv/bin:$PATH"

# Package the exact source state into the image so it can run on managed
# platforms without a host bind mount.
COPY . /workspace
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --no-deps .

# Triton bundled ptxas doesn't support latest GPU architectures
ENV TRITON_PTXAS_PATH="/usr/local/cuda/bin/ptxas"

Expand Down
Loading