简体   繁体   English

构建docker镜像时出错

[英]Getting error while building docker image

My Docker file is我的 Docker 文件是

FROM python:3
ADD myapp.py /
RUN pip3 install tensorflow-gpu
RUN pip3 install numpy
RUN pip3 install pandas
CMD ["python3", "./myapp.py]

When I build the docker image using docker build -t gaurav .当我使用docker build -t gaurav . I get the following errors我收到以下错误

Step 4/5 : RUN  pip3 install tensorflow-gpu
 ---> Running in 8f938c75e2e0
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fae543d7cd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fae543d79d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fae543d7220>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fae543d7640>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fae543d7790>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu (from versions: none)
ERROR: No matching distribution found for tensorflow-gpu
The command '/bin/sh -c pip3 install tensorflow-gpu' returned a non-zero code: 1

Can you help me here, I want to install all these packages, but I can't get past these errors.你能在这里帮我吗,我想安装所有这些软件包,但我无法克服这些错误。

https://github.com/tensorflow/tensorflow/issues/33374 - tensorflow 不适用于 python3.8,因此您必须使用 3.7 或更低版本的 python 图像:

FROM python:3.7

As stated here Tensorflow - requirements .正如这里所说的 Tensorflow-requirements

Tensorflow is supported only Python 3.5–3.7 Tensorflow 仅支持 Python 3.5-3.7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么在构建 docker 图像时出现此错误? - Why I'm getting this error while building docker image? 在构建 Docker 图像时安装 wkhtmltopdf 时未找到 Pip 错误 - Pip not found error when installing wkhtmltopdf while building Docker image 在构建 Docker 映像时运行 requirements.txt 文件时出错 - Error while running the requirements.txt file while building a Docker image 构建docker映像时出现错误消息“错误处理tar文件(退出状态1)” - Error message while building a docker image “Error processing tar file(exit status 1)” 在构建docker映像时出现pip安装错误 - pip install error while building docker images 使用 uWSGI 构建 python docker 容器时出错 - Error while building python docker container with uWSGI 构建 Docker 时出错:“包 'mongodb' 没有安装 csndidate”,带有 python:3.7 图像 - Error while building Docker: "Package 'mongodb' has no installation csndidate" with python:3.7 image 在 azure 中为 python 代码构建管道时出现错误,因为 ##[error]Bash exited with code '1' 附加错误图像 - While building a pipeline in azure for python code getting an error as ##[error]Bash exited with code '1' attaching error image 面对这个错误文件构建docker image dlib - face This error file building docker image dlib 构建 docker-compose 镜像时无法连接到 MySQL - Can't connect to MySQL while building docker-compose image
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM