Default Tensorflow binary does not work; outdated/incompatible cuDNN version
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- azure, jupyter-notebook, python, tensorflow
- Domain
- devops, machine-learning
Research direction
Start by locating the definition of the azureml_py38_PT_TF conda environment and inspect its bundled cuDNN and TensorFlow versions. Compare them with the versions in the reported workaround, then verify the environment with python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"; done means the default environment can load TensorFlow and detect the GPU without manual cuDNN replacement.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/MachineLearningNotebooks
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Azure/MachineLearningNotebooks#1975 · 1 comment ·
-
duplicates Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Azure/MachineLearningNotebooks#1960 ·
-
machine Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
Azure/MachineLearningNotebooks#1987 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Azure/MachineLearningNotebooks#1985 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Azure/MachineLearningNotebooks#1981 · 1 reaction ·
All issues in Azure/MachineLearningNotebooks
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NVIDIA/gpu-operator#2955 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
automated issue report
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dsx-ai-factory/infra-controller#6694 ·
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
facebookincubator/velox#19143 ·