Skip to content

Commit 20c290a

Browse files
committed
Switch to uv in Containerfile
Signed-off-by: Samuel Monson <smonson@redhat.com>
1 parent d4b7a38 commit 20c290a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Containerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@ USER root
1515

1616
# Install build tooling
1717
RUN dnf install -y git \
18-
&& /usr/bin/python3 -m venv /tmp/pdm \
19-
&& /tmp/pdm/bin/pip install --no-cache-dir -U pdm \
20-
&& ln -s /tmp/pdm/bin/pdm /usr/local/bin/pdm
18+
&& /usr/bin/python3 -m venv /tmp/uv \
19+
&& /tmp/uv/bin/pip install --no-cache-dir -U uv \
20+
&& ln -s /tmp/uv/bin/uv /usr/local/bin/uv
2121

22-
# Disable pdm update check
22+
# Set the default venv for uv
23+
# Copy instead of link files with uv
2324
# Set correct build type for versioning
24-
ENV PDM_CHECK_UPDATE=false \
25+
ENV VIRTUAL_ENV=/opt/app-root \
26+
UV_LINK_MODE="copy" \
2527
GUIDELLM_BUILD_TYPE=$GUIDELLM_BUILD_TYPE
2628

2729
# Copy repository files
2830
# Do this as late as possible to leverage layer caching
2931
COPY / /src
3032

3133
# Install guidellm and locked dependencies
32-
RUN pdm use -p /src -f /opt/app-root \
33-
&& pdm install -p /src -G all --check --prod --no-editable
34+
RUN uv sync --active --project /src --frozen --no-dev --extra all --no-editable
3435

3536
# Prod image
3637
FROM $BASE_IMAGE

0 commit comments

Comments
 (0)