Default Tensorflow binary does not work; outdated/incompatible cuDNN version
还没有人认领这个 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?
- 主要语言
- Jupyter Notebook
- 星标
- 4.4k
- 派生
- 2.6k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/MachineLearningNotebooks 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Azure/MachineLearningNotebooks#1975 · 1 条评论 ·
-
duplicates 未关闭
难度 1/5 1 小时以内 新手友好度 68/100
Azure/MachineLearningNotebooks#1960 ·
-
machine 未关闭
难度 5/5 一周以上 新手友好度 10/100
Azure/MachineLearningNotebooks#1987 ·
-
难度 5/5 一周以上 新手友好度 25/100
Azure/MachineLearningNotebooks#1985 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Azure/MachineLearningNotebooks#1981 · 1 个 reaction ·
查看 Azure/MachineLearningNotebooks 的全部 Issue
相似的 Issue
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 75/100
-
oblt-aw/detector/security
难度 2/5 1-3 小时 新手友好度 70/100
-
Type: AVM :a: :v: :m: Type: Bug :bug:
难度 2/5 1-3 小时 新手友好度 65/100
Azure/bicep-registry-modules#7386 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100