You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python][Packaging] Revisit Windows wheel Docker setup #45156
I'm looking at this today and have made some progress. My image so far is only 7.57GB whereas the existing wheel image is 26.8GB which is a nice savings. So far I have,
# escape=`
# build using
# docker build -t buildtools -m 2GB --file buildtools.dockerfile .
# Use the latest Windows Server Core 2022 image.
FROM mcr.microsoft.com/windows/servercore:ltsc2022
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
RUN `
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
`
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
`
# Cleanup
&& del /q vs_buildtools.exe
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Install choco CLI
# from https://chocolatey.org/install#completely-offline-install
RUN `
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install CMake and Ninja
# TODO: ARG cmake=3.31.2
RUN choco install --no-progress -r -y cmake --version=3.31.2 --installargs 'ADD_CMAKE_TO_PATH=System'
RUN choco install --no-progress -r -y gzip wget ninja
# Define the entry point for the docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
This currently starts with a warning "The system cannot find the file specified." which I think means more components are needed so I'm looking at that now.
Activity
pitrou commentedon Jan 2, 2025
cc @raulcd @kou
amoeba commentedon Feb 5, 2025
I'm looking at this today and have made some progress. My image so far is only 7.57GB whereas the existing wheel image is 26.8GB which is a nice savings. So far I have,
This currently starts with a warning "The system cannot find the file specified." which I think means more components are needed so I'm looking at that now.
amoeba commentedon Feb 5, 2025
Installing a Win10/11 SDK fixes the warning at startup,
--add Microsoft.VisualStudio.Component.Windows11SDK.pitrou commentedon Feb 5, 2025
Thanks a lot for working on this @amoeba ! Just a question: is there a reason to pin this issue?
amoeba commentedon Feb 5, 2025
Hrm, no and I'm not sure how I did that. Maybe there's a shortcut? Either way, it's unpinned now.
GH-45156: [Python][Packaging] Refactor Python Windows wheel images to…
amoeba commentedon Feb 25, 2025
Issue resolved by pull request 45442
#45442
GH-45156: [Python][Packaging] Refactor Python Windows wheel images to…