Last active
April 18, 2020 02:33
-
-
Save grigory93/cbcfaeb292897b76d713e006f2638736 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# Install core packages | |
sudo apt -y update && \ | |
sudo apt -y --no-install-recommends install \ | |
curl \ | |
apt-utils \ | |
wget \ | |
libblas-dev \ | |
default-jre \ | |
clinfo \ | |
vim | |
# Add Nvidia | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb | |
sudo apt -y update | |
sudo apt install -yqq cuda-9.0 | |
sudo apt clean | |
wget https://s3-us-west-2.amazonaws.com/h2o-internal-release/libcudnn7_7.3.1.20-1%2Bcuda9.0_amd64.deb | |
wget https://s3-us-west-2.amazonaws.com/h2o-internal-release/libcudnn7-doc_7.3.1.20-1%2Bcuda9.0_amd64.deb | |
wget https://s3-us-west-2.amazonaws.com/h2o-internal-release/libcudnn7-dev_7.3.1.20-1%2Bcuda9.0_amd64.deb | |
sudo dpkg -i libcudnn7_7.3.1.20-1+cuda9.0_amd64.deb | |
sudo dpkg -i libcudnn7-dev* | |
sudo dpkg -i libcudnn7-doc* | |
wget https://s3.amazonaws.com/artifacts.h2o.ai/releases/ai/h2o/dai/rel-1.4.2-9/x86_64-centos7/dai_1.4.2_amd64.deb | |
sudo dpkg -i dai_1.4.2_amd64.deb | |
sudo systemctl enable dai | |
sudo rm *.deb |
This file contains 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 -y update && \ | |
sudo apt -y --no-install-recommends install \ | |
curl \ | |
apt-utils \ | |
wget \ | |
libblas-dev \ | |
default-jre \ | |
clinfo \ | |
vim |
This file contains 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 wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1604-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1604-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | |
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get -y install cuda | |
# Install CUDNN | |
sudo tar xvf cudnn-10.0-linux-x64-v7.6.5.32.tar | |
sudo cp cuda/include/cudnn.h /usr/local/cuda-10.0/include | |
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-10.0/lib64 | |
sudo chmod a+r /usr/local/cuda-10.0/include/cudnn.h /usr/local/cuda-10.0/lib64/libcudnn* | |
# Enable persistence mode | |
sudo systemctl enable nvidia-persistenced | |
sudo nvidia-persistenced --persistence-mode | |
sudo nvidia-smi -pm 1 |
This file contains 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
# Enable LightGBM on GPU | |
sudo apt-get install opencl-headers clinfo ocl-icd-opencl-dev | |
sudo mkdir -p /etc/OpenCL/vendors && \ | |
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd | |
# Enable inbound port 12345 Driverless AI listens to | |
sudo ufw allow 12345/tcp |
This file contains 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 wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1604-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1604-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb | |
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get -y install cuda | |
sudo nvidia-persistenced --persistence-mode |
This file contains 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
wget https://s3.amazonaws.com/artifacts.h2o.ai/releases/ai/h2o/dai/rel-1.8.4-27/x86_64-centos7/dai_1.8.4.1_amd64.deb | |
sudo dpkg -i dai_1.8.4.1_amd64.deb | |
sudo systemctl enable dai | |
sudo rm *.deb |
This file contains 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 nvidia-persistenced --user dai | |
sudo nvidia-smi -pm 1 | |
sudo systemctl start dai | |
sudo systemctl status dai-dai |
This file contains 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
systemctl status dai-dai | |
sudo systemctl start dai | |
sudo systemctl status dai-dai | |
sudo journalctl -u dai-dai |
This file contains 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 passwd paperspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment