How to downgrade to tensorflow-gpu version 1.12 in google colab
Asked Answered
R

1

10

I am running a GAN which is compatible only with a older version of tensorflow GPU so I need to downgrade tensorflow gpu from 1.15 in google colab to 1.12. I tried using following commands which has been suggested in this thread.

%tensorflow_version 1.x
import tensorflow as tf
print(tf.__version__)

!nvcc --version

After the magic and the version check (which I get tensorflow version == 1.15.2 for now) I install below. After installation of tensorflow ==1.12.2 I restart the runtime as they suggest(I tried otherwise too) and install cuda and restart the runtime again(tried otherwise here also).

!pip install tensorflow-gpu==1.12.2

!wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
!dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
!apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
!apt-get update
!apt-get install cuda=9.0.176-1

This way has worked even up untill 2019 but it is not working for me now. I need a solution with using pip or without using pip.

I tried below code as well to uninstall the current version and installed 1.12 but it did not work. And I know that the colab does not recommend installing tensorflow using pip.

!pip uninstall tensorflow-gpu -y
Russo answered 13/6, 2020 at 8:37 Comment(3)
Can you please share the error message. I have executed your code in Google Colab and could install Tensorflow Version 1.12 (with some warnings). The Colab link is colab.research.google.com/gist/rmothukuru/….Inure
I think this is the error, because I'm having the same problem (downgrading from 2.x to 1.14) running NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.Incurve
I'm getting this error: ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.12.2 ERROR: No matching distribution found for tensorflow-gpu==1.12.2Vander
N
0
!pip uninstall tensorflow
!pip install tensorflow-gpu==1.12.0
import tensorflow as tf
print(tf.__version__)
Negus answered 20/8, 2023 at 5:25 Comment(1)
Thank you for contributing to the Stack Overflow community. This may be a correct answer, but it’d be really useful to provide additional explanation of your code so developers can understand your reasoning. This is especially useful for new developers who aren’t as familiar with the syntax or struggling to understand the concepts. Would you kindly edit your answer to include additional details for the benefit of the community?Toxicity

© 2022 - 2024 — McMap. All rights reserved.