Skip to content

Instantly share code, notes, and snippets.

@Alex4386
Last active July 12, 2019 05:37
Show Gist options
  • Save Alex4386/ed9fc8e76e73b76eec43cdf98b030174 to your computer and use it in GitHub Desktop.
Save Alex4386/ed9fc8e76e73b76eec43cdf98b030174 to your computer and use it in GitHub Desktop.
Automatic Development Environment Setup for Pattern Recognition and Machine Learning Laboratory
#!/bin/bash
echo ===========================
echo ' ____ ____ __ __ _ '
echo '| _ \| _ \| \/ | | '
echo '| |_) | |_) | |\/| | | '
echo '| __/| _ <| | | | |___ '
echo '|_| |_| \_\_| |_|_____|'
echo ===========================
echo Pattern Recognition and
echo Machine Learning Lab
echo ===========================
echo File No.1
echo
echo This Script will setup your development environment
echo Press any key to continue...
read
cd ~
echo "Please enter your sudo password if the password prompt is shown"
sudo apt update
echo Updating Existing Packages
sudo apt upgrade -y
sudo apt dist-upgrade -y
echo Installing Figlet
sudo apt install -y figlet
echo Installing Python3
sudo apt install -y python3-dev
sudo apt install -y python3-pip
echo Installing Jupyter Notebook
pip3 install jupyter notebook
echo Installing Keras, Numpy, Matplotlib
pip3 install keras numpy Matplotlib
echo Installing Curl
sudo apt install -y curl
echo Installing Visual Studio Code
curl -o vscode.deb https://az764295.vo.msecnd.net/stable/2213894ea0415ee8c85c5eea0d0ff81ecc191529/code_1.36.1-1562627527_amd64.deb
sudo dpkg -i vscode.deb
sudo apt install -f
echo Installing Node
sudo apt install -y nodejs npm
echo Installing Yarn Globally
sudo npm install -g yarn
echo Installing Emacs
sudo apt install -y emacs-nox
echo Installing Chromium
sudo apt install -y chromium-browser
echo Installing git
sudo apt install -y git
echo Installing zsh
sudo apt install -y zsh
echo running oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo Installing fonts-powerline
sudo apt install -y fonts-powerline
echo Installing powerlevel9k
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
echo You should change theme to powerlevel9k.
echo
echo copy this:
echo
echo "POWERLEVEL9K_MODE='nerdfont-complete'"
echo "ZSH_THEME=\"powerlevel9k/powerlevel9k\""
echo
echo Press Enter to Continue....
read
emacs ~/.zshrc
echo Installing zsh configuration
wget https://gist.githubusercontent.com/Alex4386/8aaf87c388d9aa02688ac6e0e6067a78/raw/6cdf0b9107496eb85e6eabe905126be83d846afc/PRML_RAs_footer.zshrc
cat PRML_RAs_footer.zshrc >> ~/.zshrc
rm PRML_RAs_footer.zshrc
echo Installing PowerLine fonts
mkdir ~/.fonts
cd ~/.fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/Ubuntu.zip
unzip Ubuntu.zip
rm Ubuntu.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/UbuntuMono.zip
unzip UbuntuMono.zip
rm UbuntuMono.zip
echo Rebuilding Font-Cache
fc-cache -fv
# Add NVIDIA package repositories
echo Installing NVIDIA CUDA Package Repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-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
echo Installing NVIDIA Machine Learning Package Repositories
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update
# Install NVIDIA driver
echo Installing NVIDIA Drivers
sudo apt-get install --no-install-recommends nvidia-driver-418
echo Downloading 2nd Script
wget https://gist.githubusercontent.com/Alex4386/ed9fc8e76e73b76eec43cdf98b030174/raw/6ec6ea4f1b36941d53a6b9ebe507c0eed594d959/prml-2.sh
chmod +x prml-2.sh
echo Run the 2nd File After the reboot,
echo Installation of 1st file completed.
mkdir ~/.prml
touch ~/.prml/install_stage
echo 1 > ~/.prml/install_stage
#!/bin/bash
echo ===========================
figlet PRML
echo ===========================
echo Pattern Recognition and
echo Machine Learning Lab
echo ===========================
echo File No.2
echo
cat ~/.prml/install_stage
if [[ $? -neq 0 ]]; then
echo File No.1 was not finished, run the File No.1 first.
fi
echo Installing NVIDIA CUDA Packages
echo "Please enter your sudo password if the password prompt is shown"
# Install development and runtime libraries (~4GB)
sudo apt-get install --no-install-recommends cuda-10-0 libcudnn7=7.6.0.64-1+cuda10.0 libcudnn7-dev=7.6.0.64-1+cuda10.0
# Install TensorRT. Requires that libcudnn7 is installed above.
echo Installing NVIDIA CUDA Libraries
sudo apt-get update
sudo apt-get install -y --no-install-recommends libnvinfer-dev=5.1.5-1+cuda10.0
echo Installing Tensorflow with GPU Accleration
pip3 install tensorflow-gpu
echo Done.
#!/bin/bash
echo running oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo Installing fonts-powerline
sudo apt install -y fonts-powerline
echo Installing powerlevel9k
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
echo You should change theme to powerlevel9k.
echo
echo copy this:
echo
echo "POWERLEVEL9K_MODE='nerdfont-complete'"
echo "ZSH_THEME=\"powerlevel9k/powerlevel9k\""
echo
echo Press Enter to Continue....
read
emacs ~/.zshrc
echo Installing zsh configuration
wget https://gist.githubusercontent.com/Alex4386/8aaf87c388d9aa02688ac6e0e6067a78/raw/6cdf0b9107496eb85e6eabe905126be83d846afc/PRML_RAs_footer.zshrc
cat PRML_RAs_footer.zshrc >> ~/.zshrc
rm PRML_RAs_footer.zshrc
echo Installing PowerLine fonts
mkdir ~/.fonts
cd ~/.fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/Ubuntu.zip
unzip Ubuntu.zip
rm Ubuntu.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/UbuntuMono.zip
unzip UbuntuMono.zip
rm UbuntuMono.zip
echo Rebuilding Font-Cache
fc-cache -fv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment