mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 05:15:11 +08:00
Update VMs for March 2022 Patch Tuesday (#23467)
* Add defenses (sleep) to Linux image creation, remove sudo from provisioning scripts, and use apt-get. * Update pools.
This commit is contained in:
parent
16d13ffc54
commit
e6509c997f
@ -2,8 +2,8 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
variables:
|
||||
windows-pool: 'PrWin-2022-01-11'
|
||||
linux-pool: 'PrLin-2021-12-13'
|
||||
windows-pool: 'PrWin-2022-03-09'
|
||||
linux-pool: 'PrLin-2022-03-09'
|
||||
osx-pool: 'PrOsx-2022-02-04'
|
||||
|
||||
jobs:
|
||||
|
@ -23,7 +23,7 @@ $ProtoVMName = 'PROTOTYPE'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$ProgressActivity = 'Creating Linux Image'
|
||||
$TotalProgress = 9
|
||||
$TotalProgress = 11
|
||||
$CurrentProgress = 1
|
||||
|
||||
Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking
|
||||
@ -104,6 +104,22 @@ New-AzVm `
|
||||
-Location $Location `
|
||||
-VM $VM
|
||||
|
||||
####################################################################################################
|
||||
Write-Progress `
|
||||
-Activity $ProgressActivity `
|
||||
-Status 'Waiting 1 minute to let Azure VM customizations be applied' `
|
||||
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
|
||||
|
||||
Start-Sleep -Seconds 60
|
||||
|
||||
####################################################################################################
|
||||
Write-Progress `
|
||||
-Activity $ProgressActivity `
|
||||
-Status 'Restarting VM' `
|
||||
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
|
||||
|
||||
Restart-AzVm -ResourceGroupName $ResourceGroupName -Name $ProtoVMName
|
||||
|
||||
####################################################################################################
|
||||
Write-Progress `
|
||||
-Activity $ProgressActivity `
|
||||
|
@ -3,8 +3,10 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
sudo apt -y update
|
||||
sudo apt -y dist-upgrade
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get -y update
|
||||
apt-get -y dist-upgrade
|
||||
# Install common build dependencies
|
||||
APT_PACKAGES="at curl unzip tar libxt-dev gperf libxaw7-dev cifs-utils \
|
||||
build-essential g++ gfortran zip libx11-dev libxkbcommon-x11-dev libxi-dev \
|
||||
@ -54,7 +56,7 @@ APT_PACKAGES="$APT_PACKAGES libxdamage-dev"
|
||||
# Additionally required/installed by Azure DevOps Scale Set Agents
|
||||
APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu66"
|
||||
|
||||
sudo apt -y install $APT_PACKAGES
|
||||
apt-get -y install $APT_PACKAGES
|
||||
|
||||
# Install newer version of nasm than the apt package, required by intel-ipsec
|
||||
mkdir /tmp/nasm
|
||||
@ -63,24 +65,24 @@ curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.gz
|
||||
tar -xf nasm-2.15.05.tar.gz
|
||||
cd nasm-2.15.05/
|
||||
./configure --prefix=/usr && make -j
|
||||
sudo make install
|
||||
make install
|
||||
cd ~
|
||||
|
||||
# Install the latest Haskell stack
|
||||
curl -sSL https://get.haskellstack.org/ | sudo sh
|
||||
curl -sSL https://get.haskellstack.org/ | sh
|
||||
|
||||
# Install CUDA
|
||||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
|
||||
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
||||
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
|
||||
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
|
||||
sudo apt -y update
|
||||
sudo apt install -y --no-install-recommends cuda-compiler-11-3 cuda-libraries-dev-11-3 cuda-driver-dev-11-3 \
|
||||
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
|
||||
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
|
||||
apt-get -y update
|
||||
apt-get install -y --no-install-recommends cuda-compiler-11-3 cuda-libraries-dev-11-3 cuda-driver-dev-11-3 \
|
||||
cuda-cudart-dev-11-3 libcublas-11-3 libcurand-dev-11-3 libcudnn8-dev libnccl2 libnccl-dev
|
||||
|
||||
# Install PowerShell
|
||||
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
sudo apt update
|
||||
sudo add-apt-repository universe
|
||||
sudo apt install -y powershell
|
||||
dpkg -i packages-microsoft-prod.deb
|
||||
apt-get update
|
||||
add-apt-repository universe
|
||||
apt-get install -y powershell
|
||||
|
Loading…
Reference in New Issue
Block a user