Skip to content

Instantly share code, notes, and snippets.

@yiminglin-ai
Last active August 24, 2017 15:28
Show Gist options
  • Save yiminglin-ai/f838ffcd7c13886bfb9bade11a4f02bd to your computer and use it in GitHub Desktop.
Save yiminglin-ai/f838ffcd7c13886bfb9bade11a4f02bd to your computer and use it in GitHub Desktop.
My personal setup for a new Ubuntu to avoid repeated configurations.
#!/usr/bin/env bash
# update systems
sudo apt-get update -y
sudo apt-get upgrade -y
# system essentials
sudo apt-get -qq install build-essential git wget cmake curl
sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils
sudo apt-get -qq install libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev
sudo apt-get -qq install --no-install-recommends libboost-all-dev
sudo apt-get -qq install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get -qq install libzip-dev
sudo apt-get -qq install nodejs npm
sudo apt-get remove openssh-client openssh-server
sudo apt-get install openssh-client openssh-server
# install cuda
cd /tmp
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get -qq install cuda
echo -e "\nexport CUDA_HOME=/usr/local/cuda\nexport CUDA_ROOT=/usr/local/cuda" >> ~/.bashrc
echo -e "\nexport PATH=/usr/local/cuda/bin:$PATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc
# anaconda python
cd /tmp
wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
bash Anaconda3-4.4.0-Linux-x86_64.sh
echo 'export PYTHONPATH="$PYTHONPATH:~/anaconda3/lib/python3.6/"' >> ~/.bashrc
# linuxbrew -- a very useful software manager for linux
cd ~/
git clone https://github.com/Linuxbrew/brew.git ~/.linuxbrew
echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >> ~/.bashrc
echo 'export MANPATH="$(brew --prefix)/share/man:$MANPATH"' >> ~/.bashrc
echo 'export INFOPATH="$(brew --prefix)/share/info:$INFOPATH"' >> ~/.bashrc
brew doctor
brew install vim tmux git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment