如何在Docker Image上安装TensorFlow的旧版本?
我需要使用tensorflow == 1.15,但是当我尝试时,
pip install tensorflow==1.15
我会发现一个错误:
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
我正在从最初从 https://catalog.ngc.ngc.nvidia.com/orgs/orgs/nvidia/containers/containers/tensorflow
那么问题与Docker图像有关吗?
我有其他模块的问题(在此链接上列出了 unignts.txt : https://github.com/hojonathanho/diffusion/blob/master/requirements.txt )
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据错误消息,我怀疑您已经从NVIDIA注册表中摘取了基于Tensorflow 2的图像。确保您在命令
docker运行中指定的TF版本 - gpus all -It-iT -rm nvcr.io/nvidia/tensorflow:xx.xx.xx-tfx-py3
is1 < /code>,例如,
docker run -gpus all -It-iT -rm nvcr.io/nvidia/tensorflow:22.04-tf1-py3
。可能还有更多可用,但是您可以在“拉”标签下拉列表中看到最新标签:

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
is1
, 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:
