-
install ubuntu 16.04 without GPU
-
download CUDA 8.0
-
$sudo apt-get update -
shut down and plug in GPU
-
start and press "esc" to grub2 window
-
hightlight "Ubuntu" and press "e" to edit: add "nomodeset" after "ro" (with a trailing space) in the "linux" line, then press f10 to start
-
sudo chvt 1 -
$sudo service lightdm stop -
$sudo bash cuda_8.0.44_linux.run -
$sudo service lightdm start -
install cuDNN 5.0
$cd cudnn_foler$sudo cp -P include/cudnn.h /usr/include$sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/$sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn* -
add PATH to ~/.bashrc
$export PATH="/usr/local/cuda-8.0/bin:$PATH"$export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH"$sudo ldconfig /usr/local/cuda-8.0/lib64
$bash Anaconda.sh
$sudo apt-get install gfortran
$git clone https://github.com/xianyi/OpenBLAS
$cd OpenBLAS
$make FC=gfortran
$sudo make PREFIX=/usr/local install
error: "cannot find -lgfortran"
solution: $sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/libgfortran.so
$conda create -n mlenv python=2.7
$source activate mlenv
(mlenv)$ conda install -c conda-forge tensorflow
-
$sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git -
$pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git -
downgrade g++ to 4.9 (5.3 or later version is not compatible)
$sudo apt-get install g++-4.9$sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20$sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10$sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20$sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10$sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30$sudo update-alternatives --set cc /usr/bin/gcc$sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30$sudo update-alternatives --set c++ /usr/bin/g++ -
work around a glibc bug
echo -e "\n[nvcc]\nflags=-D_FORCE_INLINES\n" >> ~/.theanorc -
add the following to ~/.theanorc
[global]
floatX = float32
device = gpu
[nvcc]
flags=-D_FORCE_INLINES
fastmath = True
[lib]
cnmem = 0.9
If we want to use one GPU to train multiple small nets, we need to remove the line cnmem=0.9, otherwise we get a theano error (since 90% of the GPU memory is allocated to the first net)
-
$git clone https://github.com/fchollet/keras.git -
$cd keras; $sudo python setup.py install
-
$git clone https://github.com/torch/distro.git ~/torch --recursive -
$cd ~/torch; bash install-deps; -
$ ./install.sh -
$source ~/.bashrc
-
$luarocks install lzmq -
$git clone https://github.com/facebook/iTorch.git -
$cd iTorch; luarocks make;
Refer to this but before 'make all' and 'make test', modify the Makefile.config:
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial/
-
$sudo apt-get update -
$sudo apt-get install -y build-essential git libatlas-base-dev libopencv-dev -
$git clone --recursive https://github.com/dmlc/mxnet -
$vim mxnet/make/config.mk -
change these lines:
ADD_LDFLAGS = -I/usr/local/openblas/libADD_CFLAGS = -I/usr/local/openblas/includeUSE_CUDA = 1USE_CUDNN = 1USE_CUDA_PATH = /usr/local/cuda-8.0USE_BLAS = openblas -
$cd mxnet; make -j4 -
$cd mxnet/python; python setup.py install
- opencv:
$conda install -c conda-forge opencv - sklearn update
$conda update scikit-learn - seaborn
$conda install seaborn
$sudo /usr/bin/$gnome-terminal$ccsm- "Enable Unity Desktop" - For any conflict, just disable the settings in "General"
$set fish env var:
$set -U fish_user_paths $fish_user_paths my_path
for example: set -U fisher_user_paths $fish_user_paths ~/anaconda2/bin/
$sudo rm /var/crash/*$vim /etc/default/apport- change "enable=1" to "enable=0"
$sudo service apport stop$sudo reboot
$git config credential.helper store$git push http://example.com/repo.git- Username:
- Password:
-
$sudo chown username -R ~/.matlab -
$sudo apt-get install matlab-support