Last active
August 13, 2021 04:26
-
-
Save xsqian/8e182d543d684d92d99d6bb86951cad4 to your computer and use it in GitHub Desktop.
install tensorflow with GPU support
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
#conda create an env | |
conda create -n py376-tf241 ipykernel python=3.7.6 | |
conda activate py376-tf241 | |
# find out current gpu avaliablity | |
import tensorflow as tf | |
print(tf.__version__) | |
print(tf.config.list_pysical_devices()) | |
# cudnn and cudatoolkit | |
conda list | grep cuddnn | |
conda list | grep cudatoolkit | |
# cuda compiler version | |
nvcc -V | |
#specific versionof cudnn and cudatoolkit | |
conda search cudnn | |
# install the specific version | |
conda install cudnn=7.6.5=cuda10.1_0 | |
#install gpu compatible tensorflow | |
conda install tensorflow-gpu | |
#check the tf and gpu again | |
import tensorflow as tf | |
print(tf.__version__) | |
print(tf.config.list_physical_devices()) | |
pip install numba |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment