From a1c461f6aa35f0a835fff1fab9c45596051645d3 Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Sun, 13 Sep 2026 20:50:57 -0400 Subject: [PATCH] Runner image: use embeddable Python (avoid 32-bit installer bootstrap) --- runner/Dockerfile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/runner/Dockerfile b/runner/Dockerfile index d424b72..8f0f9bf 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -29,22 +29,27 @@ RUN wget -qO /usr/local/bin/act_runner \ "https://gitea.com/gitea/act_runner/releases/download/v0.6.1/act_runner-0.6.1-linux-amd64" \ && chmod +x /usr/local/bin/act_runner -# Windows CPython 3.12, silent install into C:\Python312. -RUN wget -qO /tmp/python-installer.exe \ - "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-amd64.exe" \ - && xvfb-run -a wine /tmp/python-installer.exe \ - /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 Include_launcher=0 Shortcuts=0 \ - && rm -f /tmp/python-installer.exe \ - && wine "C:\\Python312\\python.exe" --version - -# MSVC runtime required by PySide6's Qt DLLs. +# MSVC runtime required by PySide6's Qt DLLs (also initializes the Wine prefix). RUN xvfb-run -a winetricks --unattended vcrun2022 +# Windows CPython 3.12 (embeddable zip — avoids the 32-bit installer bootstrap). +RUN wget -qO /tmp/pyembed.zip \ + "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-amd64.zip" \ + && mkdir -p /root/.wine/drive_c/Python312 \ + && cd /root/.wine/drive_c/Python312 \ + && unzip -q /tmp/pyembed.zip \ + && rm -f /tmp/pyembed.zip \ + && printf 'python312.zip\n.\nimport site\nLib\\site-packages\n' > python312._pth \ + && wine "C:\\Python312\\python.exe" --version + # Convenience wrapper: winpython -> wine C:\Python312\python.exe RUN printf '#!/bin/sh\nexec wine "C:\\Python312\\python.exe" "$@"\n' > /usr/local/bin/winpython \ && chmod +x /usr/local/bin/winpython -# Pre-install the Windows build deps so CI jobs start fast. +# Bootstrap pip, then pre-install the Windows build deps so CI jobs start fast. +RUN wget -qO /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py \ + && wine "C:\\Python312\\python.exe" /tmp/get-pip.py \ + && rm -f /tmp/get-pip.py COPY requirements-build.txt /tmp/requirements-build.txt RUN winpython -m pip install --upgrade pip \ && winpython -m pip install -r /tmp/requirements-build.txt \