2020-04-29 13:16:12 +08:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
|
|
|
2022-03-11 10:44:08 +08:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
apt-get -y update
|
|
|
|
apt-get -y dist-upgrade
|
2020-06-12 02:13:09 +08:00
|
|
|
# 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 \
|
2021-07-15 03:46:05 +08:00
|
|
|
libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev libxxf86vm-dev \
|
2020-06-12 02:13:09 +08:00
|
|
|
libxcursor-dev yasm libnuma1 libnuma-dev python-six python3-six python-yaml \
|
|
|
|
flex libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev \
|
2020-12-23 06:52:58 +08:00
|
|
|
xutils-dev dh-autoreconf autoconf-archive libgles2-mesa-dev ruby-full \
|
|
|
|
pkg-config meson"
|
2020-06-02 02:15:11 +08:00
|
|
|
|
2020-06-12 02:13:09 +08:00
|
|
|
# Additionally required by qt5-base
|
|
|
|
APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \
|
2020-12-23 06:52:58 +08:00
|
|
|
libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-util0-dev"
|
2020-06-12 02:13:09 +08:00
|
|
|
|
|
|
|
# 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 \
|
2020-07-02 01:53:10 +08:00
|
|
|
libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \
|
|
|
|
libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev"
|
2020-06-12 02:13:09 +08:00
|
|
|
|
|
|
|
# Additionally required by libhdfs3
|
|
|
|
APT_PACKAGES="$APT_PACKAGES libkrb5-dev"
|
|
|
|
|
2020-12-23 06:52:58 +08:00
|
|
|
# Additionally required by kf5windowsystem
|
|
|
|
APT_PACKAGES="$APT_PACKAGES libxcb-res0-dev"
|
|
|
|
|
2020-06-12 02:13:09 +08:00
|
|
|
# Additionally required by mesa
|
2020-08-28 03:27:39 +08:00
|
|
|
APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako"
|
|
|
|
|
|
|
|
# Additionally required by some packages to install additional python packages
|
2021-12-14 09:46:40 +08:00
|
|
|
APT_PACKAGES="$APT_PACKAGES python3-pip python3-venv"
|
2020-06-12 02:13:09 +08:00
|
|
|
|
2021-07-15 03:46:05 +08:00
|
|
|
# Additionally required by qtwebengine
|
|
|
|
APT_PACKAGES="$APT_PACKAGES nodejs"
|
|
|
|
|
|
|
|
# Additionally required by qtwayland
|
|
|
|
APT_PACKAGES="$APT_PACKAGES libwayland-dev"
|
|
|
|
|
|
|
|
# Additionally required by all GN projects
|
|
|
|
APT_PACKAGES="$APT_PACKAGES python2 python-is-python3"
|
|
|
|
|
2021-11-11 06:07:00 +08:00
|
|
|
# Additionally required by libctl
|
|
|
|
APT_PACKAGES="$APT_PACKAGES guile-2.2-dev"
|
|
|
|
|
|
|
|
# Additionally required by gtk
|
|
|
|
APT_PACKAGES="$APT_PACKAGES libxdamage-dev"
|
|
|
|
|
2020-06-12 02:13:09 +08:00
|
|
|
# Additionally required/installed by Azure DevOps Scale Set Agents
|
2021-07-15 03:46:05 +08:00
|
|
|
APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu66"
|
2020-06-12 02:13:09 +08:00
|
|
|
|
2022-03-11 10:44:08 +08:00
|
|
|
apt-get -y install $APT_PACKAGES
|
2020-06-12 02:13:09 +08:00
|
|
|
|
2020-04-30 10:33:41 +08:00
|
|
|
# Install newer version of nasm than the apt package, required by intel-ipsec
|
2020-04-29 13:16:12 +08:00
|
|
|
mkdir /tmp/nasm
|
|
|
|
cd /tmp/nasm
|
2020-12-23 06:52:58 +08:00
|
|
|
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/
|
2020-04-30 10:33:41 +08:00
|
|
|
./configure --prefix=/usr && make -j
|
2022-03-11 10:44:08 +08:00
|
|
|
make install
|
2020-04-29 13:16:12 +08:00
|
|
|
cd ~
|
|
|
|
|
|
|
|
# Install the latest Haskell stack
|
2022-03-11 10:44:08 +08:00
|
|
|
curl -sSL https://get.haskellstack.org/ | sh
|
2020-04-29 13:16:12 +08:00
|
|
|
|
|
|
|
# Install CUDA
|
2021-07-15 03:46:05 +08:00
|
|
|
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
|
2022-03-11 10:44:08 +08:00
|
|
|
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
|
2022-03-17 07:29:50 +08:00
|
|
|
apt-get install -y --no-install-recommends cuda-compiler-11-6 cuda-libraries-dev-11-6 cuda-driver-dev-11-6 \
|
|
|
|
cuda-cudart-dev-11-6 libcublas-11-6 libcurand-dev-11-6 libcudnn8-dev libnccl2 libnccl-dev
|
2020-04-29 13:16:12 +08:00
|
|
|
|
|
|
|
# Install PowerShell
|
2021-07-15 03:46:05 +08:00
|
|
|
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
|
2022-03-11 10:44:08 +08:00
|
|
|
dpkg -i packages-microsoft-prod.deb
|
|
|
|
apt-get update
|
|
|
|
add-apt-repository universe
|
|
|
|
apt-get install -y powershell
|