Windows 在docker映像中安装Tensorflow时出错

Windows 在docker映像中安装Tensorflow时出错,windows,python-3.x,docker,tensorflow,Windows,Python 3.x,Docker,Tensorflow,我正在尝试在docker映像中为我的应用程序安装tensorflow 我在文件夹中有3个文件,用于生成图像。Dockerfile、index.py和requirements.txt 这些文件的内容是 Dockerfile FROM python:alpine3.7 COPY . /app WORKDIR /app RUN pip3 install -r requirements.txt EXPOSE 5000 CMD python ./index.py requirements.txt ten

我正在尝试在docker映像中为我的应用程序安装tensorflow

我在文件夹中有3个文件,用于生成图像。
Dockerfile
index.py
requirements.txt

这些文件的内容是

Dockerfile

FROM python:alpine3.7
COPY . /app
WORKDIR /app
RUN pip3 install -r requirements.txt
EXPOSE 5000
CMD python ./index.py
requirements.txt

tensorflow==1.1.0
scikit-learn==0.18.2
scipy==0.19.1
numpy==1.13.1
requests==2.18.3
index.py

from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
    return "Hello World!"
if __name__ == "__main__":
    app.run(host="0.0.0.0", port=int("5000"), debug=True)
我在命令行中导航到windows机器中有这3个文件的文件夹,并执行命令
docker build--tag my-python-app2.

一段时间后,执行一段时间后,我得到下面的错误消息

C:\Users\test\Downloads\python-docker2>docker build --tag my-python-app2 .
Sending build context to Docker daemon  4.096kB
Step 1/6 : FROM python:alpine3.7
 ---> cc07d9ec6532
Step 2/6 : COPY . /app
 ---> Using cache
 ---> 600334d62435
Step 3/6 : WORKDIR /app
 ---> Using cache
 ---> 15208b829606
Step 4/6 : RUN pip3 install -r requirements.txt
 ---> Running in e202ecdc48ba
Collecting tensorflow==1.1.0 (from -r requirements.txt (line 1))
  Could not find a version that satisfies the requirement tensorflow==1.1.0 (from -r requirements.txt (line 1)) (from versions: )
No matching distribution found for tensorflow==1.1.0 (from -r requirements.txt (line 1))
The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1

有人能帮忙吗?

我自己找到了答案。我将tensorflow的行更改为
runpython3-mpipinstall--upgradehttps://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
Dockerfile中并将其从requirements.txt中删除

该图像中有哪个版本的
pip3
?在
步骤4
之前,如果您尝试先将
pip3
升级到最新版本,会发生什么?我刚刚尝试了一下,在
运行pip3安装-r requirements.txt
之前添加了
运行pip3安装--upgrade pip
,但仍然收到相同的错误