Skip to content

Instantly share code, notes, and snippets.

@ilomon10
Last active July 21, 2022 00:35
Show Gist options
  • Save ilomon10/ee43645b0ca239a6c8b5d6f69c2722b3 to your computer and use it in GitHub Desktop.
Save ilomon10/ee43645b0ca239a6c8b5d6f69c2722b3 to your computer and use it in GitHub Desktop.
Fix tensorflow DNN Libarary not found when use google colab with GPU runtime
# https://stackoverflow.com/questions/71000120/colab-0-unimplemented-dnn-library-is-not-found
# [Solved] Colab: (0) UNIMPLEMENTED: DNN library is not found
# Answer: https://stackoverflow.com/a/72610419
# Check libcudnn8 version
!apt-cache policy libcudnn8
# Install latest version
!apt install --allow-change-held-packages libcudnn8=8.4.1.50-1+cuda11.6
# Export env variables
!export PATH=/usr/local/cuda-11.4/bin${PATH:+:${PATH}}
!export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH
!export LD_LIBRARY_PATH=/usr/local/cuda-11.4/include:$LD_LIBRARY_PATH
!export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
# Install tensorflow
!pip install tflite-model-maker==0.4.0
!pip uninstall -y tensorflow && pip install -q tensorflow==2.9.1
!pip install pycocotools==2.0.4
!pip install opencv-python-headless==4.6.0.66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment