manylinux1_x86_64.whl 的正确 Docker 底图是什么?

What is the correct Docker Baseimage for a manylinux1_x86_64.whl?

我正在尝试在我的 docker 中安装 gurobipy。当我使用给定索引 pip install -i https://pypi.gurobi.com gurobipy 的 pip install 时,在构建图像时出现“未找到匹配的分布”错误。所以我决定直接使用正确的wheel文件。这给我留下了 ERROR: gurobipy-9.1.1-cp38-cp38-manylinux1_x86_64.whl is not a supported wheel on this platform.

MontagePy-1.0.1-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform 上解决了类似的问题,但没有足够的答案。

Gurobi 被广泛使用,我找不到其他关于 gurobi 有类似问题的人,所以我很确定我在我的 docker 文件中搞砸了一些东西。我是否使用了错误的基础图像、Python 版本或缺少任何要求?

我正在使用以下 docker 文件和要求。

Docker文件: 我通常 运行 在 运行ning 容器的终端中取消注释的行。

FROM python:3.8

WORKDIR /

COPY . ./Wueexam_optimization
RUN pip install --upgrade pip
RUN pip install -r Wueexam_optimization/optimization/requirements.txt
#RUN pip install --extra-index-url https://pypi.gurobi.com gurobipy
#RUN pip install https://pypi.gurobi.com/gurobipy/gurobipy-9.1.1-cp38-cp38-manylinux1_x86_64.whl

ENV PYTHONPATH /

WORKDIR /Wueexam_optimization/optimization
CMD ["python3","-u","app.py"]

要求:

flask
flask-cors
flask-sqlalchemy
Flask-SQLAlchemy
numpy == 1.19.3
pandas
mysqlclient
openpyxl
pulp
pymysql
cryptography

m1 可能会在构建过程中引起问题

问题是由于与 Apple M1 不兼容造成的。使用英特尔处理器构建相同的 docker 文件效果非常好。