Last active
October 26, 2018 08:24
-
-
Save zhreshold/8bb64c2a561768a54b4fd25771a7d1f0 to your computer and use it in GitHub Desktop.
CUDA 9 and CUDNN 7
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 update | |
sudo apt-get -y install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev libgfortran3 | |
wget 'https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux' -O cuda92.run | |
wget 'https://developer.nvidia.com/compute/cuda/9.2/Prod2/patches/1/cuda_9.2.148.1_linux' -O patch1.run | |
sudo sh cuda92.run | |
sudo sh patch1.run | |
echo "# CUDA9.2" >> ~/.bashrc | |
echo "export PATH=/usr/local/cuda/bin:\$PATH" >> ~/.bashrc | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc | |
source ~/.bashrc |
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 update | |
sudo apt-get -y install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev libgfortran3 | |
wget 'https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run' -O cuda9.run | |
sudo sh cuda9.run | |
echo "# CUDA9.0" >> ~/.bashrc | |
echo "export PATH=/usr/local/cuda/bin:\$PATH" >> ~/.bashrc | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc | |
source ~/.bashrc |
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 update | |
sudo apt-get -y install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev libgfortran3 | |
wget 'https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run' -O cuda9.run | |
sudo sh cuda9.run --silent --driver --toolkit | |
echo "# CUDA9.0" >> ~/.bashrc | |
echo "export PATH=/usr/local/cuda/bin:$PATH" >> ~/.bashrc | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc | |
source ~/.bashrc | |
cd ~ | |
mkdir -p efs | |
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 fs-84b234cd.efs.us-east-1.amazonaws.com:/ efs | |
cd ~/efs/downloads/ | |
sudo tar -xvf libcudnn_705_cuda90.tgz -C /usr/local/ | |
cd ~ | |
git clone --recursive https://github.com/zhreshold/mxnet -b model_zoo | |
cd mxnet | |
cp make/config.mk config.mk | |
sed -i -e 's/USE_CUDA = 0/USE_CUDA = 1/g' config.mk | |
sed -i -e 's/USE_CUDNN = 0/USE_CUDNN = 1/g' config.mk | |
sed -i -e 's/\# USE_CUDA_PATH = \/usr\/local\/cuda/USE_CUDA_PATH = \/usr\/local\/cuda/g' config.mk | |
sed -i -e 's/USE_CUDA_PATH = NONE/\# USE_CUDA_PATH = NONE/g' config.mk | |
make -j32 | |
echo "export PYTHONPATH=~/mxnet/python:$PYTHONPATH" >> ~/.bashrc | |
source ~/.bashrc |
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
python train_imagenet.py --data ~/efs/imagenet12/ --model resnet152_v2 --gpus 0,1,2,3,4,5,6,7 -j 16 -b 256 --log-interval 200 --prefix ./ --lr 0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment