Skip to content

Commit

Permalink
MP-1215 Use python image for python-base
Browse files Browse the repository at this point in the history
  • Loading branch information
TimurDaukaevMoonvision committed Jan 8, 2025
1 parent 9682b87 commit 962ca80
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docker/python-base/DockerfileUV
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG python_version
# This stage is copied from mambaorg/micromamba Dockerfile and contains everything except the actual micromamba stuff
FROM debian:12-slim AS preparation_stage
FROM python:${python_version}-slim-bookworm AS preparation_stage
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -47,14 +48,14 @@ RUN apt-get update -y \
ADD https://astral.sh/uv/install.sh /uv-installer.sh
RUN sh /uv-installer.sh && rm /uv-installer.sh
ENV PATH="/root/.local/bin/:$PATH"
# We use python base image so that we didn't have to run `uv run python` all the time
# This version should be preferred
ENV UV_PYTHON_PREFERENCE=system
# Without this you will have to pass `--no-sync` for each `uv run` call, because it will try to install dev requirements otherwise
ENV UV_NO_SYNC=true
# Next two are needed, because otherwise uv cannot find certificates
ENV UV_NATIVE_TLS=true
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
# Install python
ARG python_version
RUN uv python install --no-cache $python_version

# Install runit-docker
COPY --from=build_runit_docker /packages /packages
Expand Down

0 comments on commit 962ca80

Please sign in to comment.