|
32 | 32 | "- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/tutorial.html\n", |
33 | 33 | "- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb\n", |
34 | 34 | "\n", |
35 | | - "### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n" |
| 35 | + "### To get started, please go to \"Runtime\" ->\"change runtime type\"->select \"Python3\", and then select \"GPU\"\n", |
| 36 | + "\n", |
| 37 | + "As the COLAB environments were updated to CUDA 12.X and Python 3.11, we need to install DeepLabCut and TensorFlow in a distinct way to get TensorFlow to connect to the GPU." |
36 | 38 | ] |
37 | 39 | }, |
38 | 40 | { |
|
43 | 45 | }, |
44 | 46 | "outputs": [], |
45 | 47 | "source": [ |
46 | | - "# Installs a CUDA version compatible with tensorflow on COLAB\n", |
47 | | - "!apt update && apt install cuda-11-8\n", |
| 48 | + "# Install TensorFlow, tensorpack and tf_slim versions compatible with DeepLabCut\n", |
| 49 | + "!pip install \"tensorflow==2.12.1\" \"tensorpack>=0.11\" \"tf_slim>=1.1.0\"" |
| 50 | + ] |
| 51 | + }, |
| 52 | + { |
| 53 | + "cell_type": "code", |
| 54 | + "execution_count": null, |
| 55 | + "metadata": {}, |
| 56 | + "outputs": [], |
| 57 | + "source": [ |
| 58 | + "# Downgrade PyTorch to a version using CUDA 11.8 and cudnn 8\n", |
| 59 | + "# This will also install the required CUDA libraries, for both PyTorch and TensorFlow\n", |
| 60 | + "!pip install torch==2.3.1 torchvision --index-url https://download.pytorch.org/whl/cu118" |
| 61 | + ] |
| 62 | + }, |
| 63 | + { |
| 64 | + "cell_type": "code", |
| 65 | + "execution_count": null, |
| 66 | + "metadata": {}, |
| 67 | + "outputs": [], |
| 68 | + "source": [ |
| 69 | + "# Install the latest version of DeepLabCut\n", |
| 70 | + "!pip install \"git+https://github.com/DeepLabCut/DeepLabCut.git\"" |
| 71 | + ] |
| 72 | + }, |
| 73 | + { |
| 74 | + "cell_type": "code", |
| 75 | + "execution_count": null, |
| 76 | + "metadata": {}, |
| 77 | + "outputs": [], |
| 78 | + "source": [ |
| 79 | + "# As described in https://www.tensorflow.org/install/pip#step-by-step_instructions, \n", |
| 80 | + "# create symbolic links to NVIDIA shared libraries:\n", |
| 81 | + "!ln -svf /usr/local/lib/python3.11/dist-packages/nvidia/*/lib/*.so* /usr/local/lib/python3.11/dist-packages/tensorflow" |
| 82 | + ] |
| 83 | + }, |
| 84 | + { |
| 85 | + "cell_type": "markdown", |
| 86 | + "metadata": {}, |
| 87 | + "source": [ |
| 88 | + "### Important - Restart the Runtime for the updated packages to be imported!\n", |
48 | 89 | "\n", |
49 | | - "# Install the latest DeepLabCut version:\n", |
50 | | - "!pip install \"deeplabcut[tf]\"" |
| 90 | + "PLEASE, click \"restart runtime\" from the output above before proceeding!" |
51 | 91 | ] |
52 | 92 | }, |
53 | 93 | { |
|
0 commit comments