Skip to content

Commit 623e0c9

Browse files
committed
devtools: Install UV
1 parent 4af12ae commit 623e0c9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

devtools/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ RUN wget -c "${SLINT_LSP_URL}" -O /tmp.tar.gz \
5959
&& rm /tmp.tar.gz \
6060
&& slint-lsp --version
6161

62+
# Install UV
63+
# Set its python directory to a known, user-writable path to allow accessing the
64+
# python versions installed during docker build from within CI runs which are
65+
# run as non-root.
66+
ARG UV_VERSION="0.7.13"
67+
ARG UV_URL="https://github.com/astral-sh/uv/releases/download/$UV_VERSION/uv-x86_64-unknown-linux-gnu.tar.gz"
68+
ENV UV_PYTHON_INSTALL_DIR="/.uv/python"
69+
RUN wget -c "${UV_URL}" -O /tmp.tar.gz \
70+
&& tar -xzf /tmp.tar.gz --strip-components=1 -C /usr/local/bin/ \
71+
&& rm /tmp.tar.gz \
72+
&& mkdir -p $UV_PYTHON_INSTALL_DIR && chmod 777 $UV_PYTHON_INSTALL_DIR
73+
74+
# Pre-install a Python version
75+
ARG PYTHON_VERSION="3.13"
76+
RUN uv python install $PYTHON_VERSION
77+
6278
# Install Python packages
6379
ENV PIP_BREAK_SYSTEM_PACKAGES=1
6480
RUN pip3 install \

0 commit comments

Comments
 (0)