Skip to content

Commit

Permalink
Upgraded Windows VMs to Windows Server 2022 (#2108)
Browse files Browse the repository at this point in the history
- Upgraded Windows VMs to Windows Server 2022. (Had to use
`windows-2022` instead of `windows-2022-core` due to an issue of
installing vc build tools)
- Updated the setup script to work on the new Windows version. (Python
upgraded to 3.12 from 3.9, dropped python 2)

Working towards
#2089
  • Loading branch information
meteorcloudy authored Nov 11, 2024
1 parent ccd4457 commit bd27193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions buildkite/create_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"project": "bazel-public",
"zone": "us-central1-f",
"source_image_project": "windows-cloud",
"source_image_family": "windows-2019-core",
"source_image_family": "windows-2022", # vs build tools failed to install on windows-2022-core
"setup_script": "setup-windows.ps1",
"guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"],
},
Expand All @@ -53,7 +53,7 @@
"zone": "us-central1-f",
"network": "default",
"source_image_project": "windows-cloud",
"source_image_family": "windows-2019",
"source_image_family": "windows-2022",
"setup_script": "setup-windows.ps1",
"guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"],
},
Expand Down
16 changes: 3 additions & 13 deletions buildkite/setup-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,33 +159,23 @@ foreach ($directory in $directories) {
[Environment]::SetEnvironmentVariable("BAZEL_VC", "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC", "Machine")
$env:BAZEL_VC = [Environment]::GetEnvironmentVariable("BAZEL_VC", "Machine")

## Install Windows 10 SDK
## https://github.com/bazelbuild/continuous-integration/issues/768
& choco install windows-sdk-10-version-2004-all

## Install Python2
Write-Host "Installing Python 2..."
& choco install python2 --params "/InstallDir:C:\python2"
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine")

## Install Python3
Write-Host "Installing Python 3..."
& choco install python3 --params "/InstallDir:C:\python3" --version=3.9.7
& choco install python312 --params "/InstallDir:C:\python3"
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine")
New-Item -ItemType SymbolicLink -Path "C:\python3\python3.exe" -Target "C:\python3\python.exe"

## Install a couple of Python modules required by TensorFlow.
Write-Host "Updating Python package management tools..."
& "C:\Python2\python.exe" -m pip install --upgrade pip setuptools wheel
& "C:\Python3\python.exe" -m pip install --upgrade pip setuptools wheel

Write-Host "Installing Python packages..."
& "C:\Python3\Scripts\pip.exe" install --upgrade `
autograd `
numpy~=1.21.2 `
numpy `
portpicker `
protobuf `
pyreadline `
pyreadline3 `
six `
requests `
pyyaml `
Expand Down

0 comments on commit bd27193

Please sign in to comment.