Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Default Tensorflow binary does not work; outdated/incompatible cuDNN version

未關閉
#1,908 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
azure, jupyter-notebook, python, tensorflow

研究方向

先找出 conda 環境 azureml_py38_PT_TF 的定義,並檢查其隨附的 cuDNN 與 TensorFlow 版本。將它們與回報的因應方法中的版本進行比較,然後使用 python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" 驗證環境;完成的標準是預設環境無需手動替換 cuDNN 即可載入 TensorFlow 並偵測到 GPU。

由索引模型根據 Issue 內容生成。

描述

The azureml_py38_PT_TF conda environment is broken and doesn't work as the current (as of 17/05/2023) as the default cuDNN binary is version 6.1, which is not compatible with any version of tensorflow.

Current work around is to manually update the cuDNN binaries as below, using the link from Nvidia

export URL="CUDNN-8.6.0-LINK-FROM-NVIDIA-WEBSITE"
# ==== DOWNLOAD CUDDN ==== 
curl $URL -o ./cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz 
sudo tar -xvf ./cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz
# ==== INSTALL CUDDN ==== 
sudo cp ./cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include 
sudo cp -P ./cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64 
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
# ==== LINK UPDATED BINARIES ==== 
sudo ldconfig
# ==== INSTALL CONDA ENV ==== 
conda create -n "tfgpu" python=3.10 -y
conda activate tfgpu
conda install -c conda-forge cudatoolkit=11.8.0 ipykernel -y
python3 -m pip install nvidia-cudnn-cu11==8.6.0.163 tensorflow==2.12.*
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
python3 -m ipykernel install --user --name tfgpu --display-name "Python (tf-cudnn8.6)"
# ==== VERIFY ==== 
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

Is it possible to bump the included cuDNN version to get around this problem?

(Associated SO post)

主要語言
Jupyter Notebook
星號
4.4k
分支
2.6k
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Azure/MachineLearningNotebooks 的其他 Issue

查看 Azure/MachineLearningNotebooks 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。