Skip to content

Commit bd27193

Browse files
authored
Upgraded Windows VMs to Windows Server 2022 (#2108)
- 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
1 parent ccd4457 commit bd27193

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

buildkite/create_images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"project": "bazel-public",
4545
"zone": "us-central1-f",
4646
"source_image_project": "windows-cloud",
47-
"source_image_family": "windows-2019-core",
47+
"source_image_family": "windows-2022", # vs build tools failed to install on windows-2022-core
4848
"setup_script": "setup-windows.ps1",
4949
"guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"],
5050
},
@@ -53,7 +53,7 @@
5353
"zone": "us-central1-f",
5454
"network": "default",
5555
"source_image_project": "windows-cloud",
56-
"source_image_family": "windows-2019",
56+
"source_image_family": "windows-2022",
5757
"setup_script": "setup-windows.ps1",
5858
"guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"],
5959
},

buildkite/setup-windows.ps1

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,33 +159,23 @@ foreach ($directory in $directories) {
159159
[Environment]::SetEnvironmentVariable("BAZEL_VC", "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC", "Machine")
160160
$env:BAZEL_VC = [Environment]::GetEnvironmentVariable("BAZEL_VC", "Machine")
161161

162-
## Install Windows 10 SDK
163-
## https://github.com/bazelbuild/continuous-integration/issues/768
164-
& choco install windows-sdk-10-version-2004-all
165-
166-
## Install Python2
167-
Write-Host "Installing Python 2..."
168-
& choco install python2 --params "/InstallDir:C:\python2"
169-
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine")
170-
171162
## Install Python3
172163
Write-Host "Installing Python 3..."
173-
& choco install python3 --params "/InstallDir:C:\python3" --version=3.9.7
164+
& choco install python312 --params "/InstallDir:C:\python3"
174165
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine")
175166
New-Item -ItemType SymbolicLink -Path "C:\python3\python3.exe" -Target "C:\python3\python.exe"
176167

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

182172
Write-Host "Installing Python packages..."
183173
& "C:\Python3\Scripts\pip.exe" install --upgrade `
184174
autograd `
185-
numpy~=1.21.2 `
175+
numpy `
186176
portpicker `
187177
protobuf `
188-
pyreadline `
178+
pyreadline3 `
189179
six `
190180
requests `
191181
pyyaml `

0 commit comments

Comments
 (0)