From 91c6bc158480847068e2301395e0e9244fa1b654 Mon Sep 17 00:00:00 2001 From: "andrey.krotkikh" Date: Fri, 16 Jun 2023 20:15:09 +0300 Subject: [PATCH] fix gpu --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 149e9cd..cc56c93 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,22 @@ Videos of hand by Katie Rupp Here are some references for DeepLabCut and other things this project relies upon: - Mathis et al, 2018, "DeepLabCut: markerless pose estimation of user-defined body parts with deep learning" - Romero-Ramirez et al, 2018, "Speeded up detection of squared fiducial markers" + +## How to launch Anipose on new versions of TensorFlow 2+ and on GPU and Linux (tested on AWS with Tesla) +I used all instructions from Anipose Installation +Moving from CPU to GPU on Tesla provided 15x speed boost + +# Important +Installation tensorflow 2.12.* failed cause python 3.7 is too old, so I selected version from suggested 2.11.0 +# Commands +conda install -c conda-forge cudatoolkit=11.8.0 +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 +# Verify install: +python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" + +# Instruction originated from here +https://www.tensorflow.org/install/pip