forked from abel-leulseged/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetup.sh
130 lines (107 loc) · 5.1 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Disable Nvidia nouveau driver
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo update-initramfs -u
# Basics
sudo apt-get install -y git
sudo apt-get install -y curl
sudo apt-get install -y zsh
sudo apt-get install -y hexchat
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Install VSCODE
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt-get update
sudo apt-get upgrade
sudo apt install code
# Time Diff
timedatectl set-local-rtc 0
# Install Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt-get update
sudo apt-get install -y google-chrome-stable
# Spotify
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y spotify-client
# Musixmatch
# https://download-app.musixmatch.com/
# Install Anaconda
sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
bash Anaconda3-2019.03-Linux-x86_64.sh
echo 'export PATH=~/anaconda3/bin:$PATH' >> ~/.zshrc
rm Anaconda3-2019.03-Linux-x86_64.sh
# XDMAN
wget https://sourceforge.net/projects/xdman/files/xdm-2018-x64.tar.xz
tar -xvf xdm-2018-x64.tar.xz
rm xdm-2018-x64.tar.xz
sudo ./install.sh
rm install.sh readme.txt
# Deluge (Torrent Client)
sudo add-apt-repository ppa:deluge-team/ppa
sudo apt install deluge
# Setup default conda virtual environment for projects
conda create -n projects python=3.6
echo 'source activate projects' >> ~/.zshrc
conda install -c conda-forge ipywidgets -y
pip install kaggle
# Nvidia and cuda
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-396
sudo reboot
# cuda
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.168-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.1.168-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
# cuDNN
wget https://developer.download.nvidia.com/compute/machine-learning/cudnn/secure/v7.6.1.34/prod/10.1_20190620/cudnn-10.1-linux-x64-v7.6.1.34.tgz?8rGe05RSdL3wR5UOQNJEZbab_8R4Xv4oxBoJ6jWyf20rM7HrFYgg5udUW5XaAykR3xs1g-exTJwutcTA3aW_oYOSlxQjvmav1ie3oUfdtEzMUucqj2rjyrhLErPJ44AV6msLZKCVcB_cJ3g0ehNbsFm_glBKIT56tySo4c1pZR6mKiRbGaJ92HXtFNOP5g38GhOwE4Fy6BarGhb3TRCpAST6yGQ
tar -zxvf cudnn-10.1-linux-x64-v7.6.1.34.tgz?8rGe05RSdL3wR5UOQNJEZbab_8R4Xv4oxBoJ6jWyf20rM7HrFYgg5udUW5XaAykR3xs1g-exTJwutcTA3aW_oYOSlxQjvmav1ie3oUfdtEzMUucqj2rjyrhLErPJ44AV6msLZKCVcB_cJ3g0ehNbsFm_glBKIT56tySo4c1pZR6mKiRbGaJ92HXtFNOP5g38GhOwE4Fy6
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-10.1/lib64/
sudo cp cuda/include/cudnn.h /usr/local/cuda-10.1/include/
sudo chmod a+r /usr/local/cuda-10.1/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
sudo apt-get -y install libcupti-dev
echo 'export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}' >> ~/.zshrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.zshrc
source ~/.zshrc
pip install --upgrade tensorflow-gpu
# VLC
sudo apt install -y vlc
# Slack
wget https://downloads.slack-edge.com/linux_releases/slack-desktop-3.4.2-amd64.deb
sudo dpkg -i slack-desktop-3.4.2-amd64.deb
rm slack-desktop-3.4.2-amd64.deb
# OpenCV
conda install -c conda-forge opencv
conda install pydot
# Gcloud setup
sudo apt-get install -y sshfs
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install -y google-cloud-sdk
# https://www.cyberciti.biz/faq/google-cloud-compute-engin-ssh-into-an-instance-from-linux-unix-appleosx/
# Battery Life Issues
# https://medium.com/@tomwwright/better-battery-life-on-ubuntu-17-10-4588b7f72def
# Finish Up
sudo apt update
sudo apt upgrade
# ALIASES AND FUNCTIONS
# alias mount_wilkes='sshfs [email protected]:/home/atadesse/ ~/Wilkes/'
# alias unmount_wilkes='fusermount -u ~/Wilkes/'
# mount_cs152(){
# gcloud compute instances start cs152
# gcloud compute config-ssh
# sshfs [email protected]:/home/abelleulseged ~/cs152/
# }
# unmount_cs152(){
# fusermount -u ~/cs152/ && gcloud compute instances stop cs152
# }