Skip to content

Commit

Permalink
fix(containerfile): Speed up containerfile creation
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Oct 24, 2024
1 parent 1badb6b commit 649900a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ RUN --mount=type=cache,target=/root/.cache \
uv pip install --no-deps --python=$UV_PROJECT_ENVIRONMENT /src && \
cp -r /usr/local/lib/python3.12 /venv/lib/ && \
cp --remove-destination /usr/local/bin/python3.12 /venv/bin/python && \
cp --remove-destination /usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1 /lib/ && \
cp /usr/local/lib/libpython3.12.so.1.0 /venv/lib/ && \
rm -r /venv/lib/python3.12/site-packages/**/tests && \
rm -r /venv/lib/python3.12/site-packages/**/_*cache* && \
rm /venv/lib/python3.12/site-packages/numpy.libs/libscipy_openblas64_-0f683016.so
RUN du -ah /venv/lib/python3.12/site-packages --max-depth=2 | sort -h | tail -n 30

# cp --remove-destination /usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1 /lib/ && \
# Copy the virtualenv into a distroless image
# * These are small images that only contain the runtime dependencies
FROM gcr.io/distroless/python3-debian11
Expand Down

0 comments on commit 649900a

Please sign in to comment.