Skip to content
Open
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
30 changes: 17 additions & 13 deletions docker/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,30 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM nvcr.io/nvidia/pytorch:25.09-py3

FROM nvcr.io/nvidia/pytorch:25.09-py3
WORKDIR /workspace

# Install uv
ENV UV_VERSION="0.8.22"
RUN curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"

# Set up virtual environment for uv
ENV UV_PROJECT_ENVIRONMENT=/opt/venv
ENV UV_CACHE_DIR=/opt/uv_cache
ENV PATH="$UV_PROJECT_ENVIRONMENT/bin:$PATH"
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV UV_LINK_MODE=copy
ENV UV_VERSION="0.8.22"

# Create virtual environment
RUN uv venv ${UV_PROJECT_ENVIRONMENT} --system-site-packages
RUN curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh | sh && \
uv venv ${UV_PROJECT_ENVIRONMENT} --system-site-packages

# Copy dependency files
COPY pyproject.toml uv.lock ./
COPY pyproject.toml uv.lock /workspace/

# Install test dependencies using uv sync
RUN uv sync --link-mode copy --locked --group test --no-install-project
# Install all dependency groups (automodel, test, dev, docs) with build caching
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/root/.cache/uv \
uv sync \
--link-mode copy \
--locked \
--all-groups \
--no-install-project && \
uv cache prune