diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-06-11 11:13:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-11 11:13:09 -0700 |
| commit | 55d6bd1b7d1fab3515b3c7f18d2607906919d356 (patch) | |
| tree | 3857acc726c12e3efbf3e7fd74b0999a29b3894b /scripts/azure-pipelines/linux/provision-image.sh | |
| parent | ae45816c34d604967209bc3218f33ab328927702 (diff) | |
| download | vcpkg-55d6bd1b7d1fab3515b3c7f18d2607906919d356.tar.gz vcpkg-55d6bd1b7d1fab3515b3c7f18d2607906919d356.zip | |
[vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS (#11365)
Co-authored-by: @JackBoosY
Co-authored-by: Stefano Sinigardi <stesinigardi@hotmail.com>
Co-authored-by: Voskrese <10104740+Voskrese@users.noreply.github.com>
Diffstat (limited to 'scripts/azure-pipelines/linux/provision-image.sh')
| -rwxr-xr-x | scripts/azure-pipelines/linux/provision-image.sh | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh index dccf28691..0fa7edbf7 100755 --- a/scripts/azure-pipelines/linux/provision-image.sh +++ b/scripts/azure-pipelines/linux/provision-image.sh @@ -5,15 +5,41 @@ sudo apt -y update sudo apt -y dist-upgrade -# Install common build dependencies and partitioning tools -sudo apt -y install at curl unzip tar libxt-dev gperf libxaw7-dev cifs-utils build-essential g++ gfortran zip libx11-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev libxcursor-dev yasm libnuma1 libnuma-dev python-six python3-six python-yaml flex libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev xutils-dev dh-autoreconf libgles2-mesa-dev ruby-full pkg-config -# Required by qt5-x11extras -sudo apt -y install libxkbcommon-dev libxkbcommon-x11-dev -# Required by libhdfs3 -sudo apt -y install libkrb5-dev -# Required by mesa -sudo apt -y install python3-setuptools +# 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 \ + libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev \ + libxcursor-dev yasm libnuma1 libnuma-dev python-six python3-six python-yaml \ + flex libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev \ + xutils-dev dh-autoreconf libgles2-mesa-dev ruby-full pkg-config" +# Additionally required by qt5-base +APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \ + libxcb1-dev libx11-xcb-dev libxcb-glx0-dev" + +# Additionally required by qt5-base for qt5-x11extras +APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \ + libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev \ + libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev" + +# Additionally required by libhdfs3 +APT_PACKAGES="$APT_PACKAGES libkrb5-dev" + +# Additionally required by mesa +APT_PACKAGES="$APT_PACKAGES python3-setuptools" + +# Additionally required/installed by Azure DevOps Scale Set Agents +APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu60" + +sudo apt -y install $APT_PACKAGES + +# Delete /etc/debian_version to prevent Azure Pipelines Scale Set Agents from +# removing some of the above +sudo apt-mark hold libcurl4 +sudo apt-mark hold liblttng-ust0 +sudo apt-mark hold libkrb5-3 +sudo apt-mark hold zlib1g +sudo apt-mark hold libicu60 # Install newer version of nasm than the apt package, required by intel-ipsec mkdir /tmp/nasm @@ -37,7 +63,6 @@ sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb sudo apt -y update sudo apt install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 libcublas10 cuda-curand-dev-10-2 sudo apt install -y --no-install-recommends libcudnn7-dev -sudo ln -s /usr/local/cuda-10.1/lib64/stubs/libcuda.so /usr/local/cuda-10.1/lib64/stubs/libcuda.so.1 # Install PowerShell wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb @@ -46,6 +71,11 @@ sudo apt update sudo add-apt-repository universe sudo apt install -y powershell +if [ -z "$StorageAccountName" ]; then +echo "No storage account supplied, skipping." +else +echo "Mapping storage account" + # Write SMB credentials sudo mkdir /etc/smbcredentials smbCredentialFile=/etc/smbcredentials/$StorageAccountName.cred @@ -56,19 +86,4 @@ sudo chmod 600 $smbCredentialFile # Mount the archives SMB share to /archives sudo mkdir /archives -m=777 echo "//$StorageAccountName.file.core.windows.net/archives /archives cifs nofail,vers=3.0,credentials=$smbCredentialFile,serverino,dir_mode=0777,file_mode=0777 0 0" | sudo tee -a /etc/fstab - -# Create 'home' directory for haskell stack bits that want this -sudo mkdir -p /home/root -m=777 - -# Delete /etc/debian_version to prevent Azure Pipelines Scale Set Agents from removing some of the above -sudo rm /etc/debian_version - -# Install dependencies that the Azure Pipelines agent will want later to make launching VMs faster -# https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?tabs=netcore31&pivots=os-linux -# (we assume libssl1.0.0 or equivalent is already installed to not accidentially change SSL certs) -apt install -y liblttng-ust0 libkrb5-3 zlib1g libicu60 - -# Create work trees for the Azure Pipelines agent so that it puts its work tree into temporary storage. -sudo chmod 777 /mnt -sudo mkdir /agent -m=777 -sudo ln -s /mnt /agent/_work +fi |
