-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup_code_building.sh
executable file
·65 lines (55 loc) · 1.47 KB
/
setup_code_building.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
set -e
set -u
export DEBIAN_FRONTEND=noninteractive
readonly PKGS=(
ssh-askpass
bazel
clang-3.6
clang-format-3.5
gfortran
git
libblas-dev
liblapack-dev
libpython3-dev
libpython-dev
python3
python3-matplotlib
python3-numpy
python3-scipy
python-matplotlib
python-scipy
resolvconf
ruby
)
# Set up the backports repo.
cat > /etc/apt/sources.list.d/backports.list <<EOT
deb http://http.debian.net/debian jessie-backports main
EOT
# Set up the LLVM repo.
cat > /etc/apt/sources.list.d/llvm-3.6.list <<EOT
deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main
deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main
EOT
# Set up the 971-managed bazel repo.
cat > /etc/apt/sources.list.d/bazel-971.list <<EOT
deb http://robotics.mvla.net/files/frc971/packages jessie main
EOT
# Enable user namespace for sandboxing.
cat > /etc/sysctl.d/99-enable-user-namespaces.conf <<EOT
kernel.unprivileged_userns_clone = 1
EOT
# We need to explicitly pull in the java certificates from backports. Otherwise
# bazel won't install properly.
cat > /etc/apt/preferences.d/java_certificates <<EOT
Package: ca-certificates-java
Pin: release a=jessie-backports
Pin-Priority: 900
EOT
# Accept the LLVM GPG key so we can install their packages.
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
# Install all the packages that we need/want.
apt-get update
for pkg in "${PKGS[@]}"; do
apt-get install -y -f --force-yes "$pkg"
done