@@ -43,10 +43,6 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
4343 make \
4444 ninja-build \
4545 p7zip-full \
46- python3 \
47- python3-pip \
48- python3-setuptools \
49- python3-wheel \
5046 software-properties-common \
5147 wget \
5248 xvfb \
@@ -58,13 +54,6 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
5854RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
5955RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
6056
61- # Set Python3 as default Python version
62- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 100
63- RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 100
64-
65- # Allow installing pip packages system-wide since there's no risk in a container
66- ENV PIP_BREAK_SYSTEM_PACKAGES=1
67-
6857# Install Rust
6958# Make .cargo/ writable for everyone to allow running the container as non-root.
7059ARG RUST_VERSION="1.87.0"
@@ -181,6 +170,22 @@ RUN wget -c "$LINUXDEPLOY_URL" -O /usr/local/bin/linuxdeploy-x86_64.AppImage \
181170 && chmod a+x /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage \
182171 && linuxdeploy-x86_64.AppImage --list-plugins
183172
173+ # Install UV
174+ # Set its python directory to a known, user-writable path to allow accessing the
175+ # python versions installed during docker build from within CI runs which are
176+ # run as non-root.
177+ ARG UV_VERSION="0.7.13"
178+ ARG UV_URL="https://github.com/astral-sh/uv/releases/download/$UV_VERSION/uv-x86_64-unknown-linux-gnu.tar.gz"
179+ ENV UV_PYTHON_INSTALL_DIR="/.uv/python"
180+ RUN wget -c "${UV_URL}" -O /tmp.tar.gz \
181+ && tar -xzf /tmp.tar.gz --strip-components=1 -C /usr/local/bin/ \
182+ && rm /tmp.tar.gz \
183+ && mkdir -p $UV_PYTHON_INSTALL_DIR && chmod 777 $UV_PYTHON_INSTALL_DIR
184+
185+ # Pre-install a Python version
186+ ARG PYTHON_VERSION="3.13"
187+ RUN uv python install $PYTHON_VERSION
188+
184189# Install latest OpenSSL to avoid possible issues if servers some day stop
185190# working with an old OpenSSL library (as already happened in the past).
186191ARG OPENSSL_VERSION="3.4.1"
0 commit comments