-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
100 lines (62 loc) · 2.71 KB
/
setup.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
sudo -E sh <<EOF
# Update and Upgrade
apt-get update
apt-get -y upgrade
# Setup Certificates
apt-get install -y ca-certificates curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
# Setup Apt Sources
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu\
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \
> /etc/apt/sources.list.d/nvidia-container-toolkit.list
# Update and Install
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin nvidia-container-toolkit nvidia-driver-550-open python-is-python3
# Download .deb files
wget -O vscode.deb https://update.code.visualstudio.com/1.93.1/linux-deb-x64/stable
wget https://github.com/pulsar-edit/pulsar/releases/download/v1.120.0/Linux.pulsar_1.120.0_amd64.deb
# Install .deb files
echo "code code/add-microsoft-repo boolean true" | debconf-set-selections
dpkg -i vscode.deb Linux.pulsar_1.120.0_amd64.deb
# Download other software
wget https://www.ximea.com/downloads/recent/XIMEA_Linux_SP.tgz
# Install other software
tar -xzf XIMEA_Linux_SP.tgz
sh -c "cd package; ./install -pcie"
# Configure
cp TEM_setup/config/docker/daemon.json /etc/docker/
EOF
# Install PIP
wget -O- https://bootstrap.pypa.io/get-pip.py | python
# Install Python Packages
pip install pigeon-config
# Install Extensions
echo "ms-azuretools.vscode-docker
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
ms-vscode.makefile-tools
twxs.cmake" | sed 's/^/--install-extension /' | xargs code
ppm install atom-material-syntax atom-material-syntax-light atom-material-ui auto-detect-indentation \
autocomplete-python build build-make busy-signal language-cmake minimap
# Configure Extensions
cp TEM_setup/config/pulsar/config.cson ~/.pulsar/
# Create SSH key
ssh-keygen -f $HOME/.ssh/id_rsa -P ""
echo "Please add the following SSH key to your GitHub account (https://github.com/settings/ssh/new):"
echo
cat $HOME/.ssh/id_rsa.pub
echo
read -p "Press enter when complete." KEY
# Download Repositories
git clone [email protected]:AllenInstitute/TEM_config.git ~/Documents/TEM_config
# Reboot
read -p "Press enter to reboot." KEY
reboot