Last active
March 3, 2017 03:31
-
-
Save hakatashi/0c3fc314af9f0c708d4ba1cefe9fcfdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| sudo apt-get install build-essential awscli python3 python3-pip libpython3-dev libhdf5-dev cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev aria2 -y | |
| aria2c -x 16 -s 16 https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb | |
| sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb | |
| sudo apt-get update | |
| sudo apt-get install cuda -y | |
| aws s3 cp s3://hakata-generic/cudnn-8.0-linux-x64-v5.1.solitairetheme8 . | |
| tar xvzf cudnn-8.0-linux-x64-v5.1.solitairetheme8 | |
| sudo cp cuda/include/cudnn.h /usr/local/cuda-8.0/include | |
| sudo cp cuda/lib64/libcudnn* /usr/local/cuda-8.0/lib64 | |
| sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn* | |
| export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} | |
| export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
| export CFLAGS=-I/usr/local/cuda-8.0/include | |
| export LDFLAGS=-L/usr/local/cuda-8.0/lib64 | |
| export CUDA_HOME=/usr/local/cuda | |
| pip install --upgrade pip | |
| pip3 install pillow cython h5py protobuf numpy | |
| sudo pip3 install chainer | |
| git clone https://github.com/opencv/opencv | |
| cd opencv | |
| git checkout 3.2.0 | |
| mkdir release | |
| cd release | |
| cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_EIGEN=ON -D PYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -D PYTHON_INCLUDE_DIRS=/usr/include/python3.5m -D PYTHON_EXECUTABLE=/usr/bin/python3 -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1 .. | |
| make -j9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment