-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding script to setup GPU usage (#82)
* Adding script to setup GPU usage with Tensorflow 2.4 Co-authored-by: Temesghen Kahsai <teme@gretel.ai>
- Loading branch information
Showing
5 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
41 changes: 41 additions & 0 deletions
41
setup-utils/setup-gretel-synthetics-tensorflow24-with-gpu.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#NOTE: Initialize conda (pyenv or virtualenv) before running the script!!! | ||
#conda create --name tf --yes python=3.8 | ||
#conda activate tf | ||
|
||
echo 'Adding NVIDIA package repositories' | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin | ||
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 | ||
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | ||
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" | ||
sudo apt-get update | ||
|
||
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb | ||
|
||
sudo apt install -y ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb | ||
sudo apt-get update | ||
|
||
echo 'Installing NVIDIA driver' | ||
sudo apt-get install --no-install-recommends nvidia-driver-450 | ||
|
||
wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libnvinfer7_7.1.3-1+cuda11.0_amd64.deb | ||
sudo apt install ./libnvinfer7_7.1.3-1+cuda11.0_amd64.deb | ||
sudo apt-get update | ||
|
||
echo 'Installing development and runtime libraries (~4GB)' | ||
sudo apt-get install --no-install-recommends \ | ||
cuda-11-0 \ | ||
libcudnn8=8.0.4.30-1+cuda11.0 \ | ||
libcudnn8-dev=8.0.4.30-1+cuda11.0 | ||
|
||
echo 'Installing TensorRT. Requires that libcudnn8 is installed above.' | ||
sudo apt-get install -y --no-install-recommends libnvinfer7=7.1.3-1+cuda11.0 \ | ||
libnvinfer-dev=7.1.3-1+cuda11.0 \ | ||
libnvinfer-plugin7=7.1.3-1+cuda11.0 | ||
|
||
|
||
echo 'Installing tensorflow=2.4 and gretel-synthetics' | ||
pip3 install --upgrade pip | ||
pip3 install tensorflow==2.4 gretel-synthetics | ||
|
||
echo 'Check if tensorflow with gpu support is installed' | ||
python -c "import tensorflow as tf; tf.test.gpu_device_name()" |
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