Alessandro
Alessandro

Reputation: 123

How to install old version of tensorflow on Docker image?

I need to use tensorflow==1.15, but when I try

pip install tensorflow==1.15

I get an Error:

ERROR: Could not find a version that satisfies the requirement tensorflow==1.15 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1)
ERROR: No matching distribution found for tensorflow==1.15

I'm working inside a Docker container built from an image pulled from originally pulled from https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow

So is the problem related to the Docker image?

I'm having this problem for other modules (listed in requirements.txt at this link: https://github.com/hojonathanho/diffusion/blob/master/requirements.txt)

Upvotes: 0

Views: 804

Answers (1)

sloppypasta
sloppypasta

Reputation: 1126

Based on the error message, I suspect that you have pulled a tensorflow 2 based image from the nvidia registry. Make sure that the tf version you specify in the command docker run --gpus all -it --rm nvcr.io/nvidia/tensorflow:xx.xx-tfx-py3 is 1, e.g., docker run --gpus all -it --rm nvcr.io/nvidia/tensorflow:22.04-tf1-py3.

There are probably more available, but you can see the most recent tags in the Pull Tag dropdown: Nvidia Tensorflow Pull Tags

Upvotes: 1

Related Questions