我有一个电影推荐系统,我正在尝试为它创建一个 docker 镜像。
要求.txt
pandas==0.22.0
requests==2.18.4
Django==2.0.6
Scrapy==1.5.1
numpy==1.14.0
scipy==1.0.0
pymongo==3.7.2
Dockerfile:
FROM python:3
MAINTAINER SPARSH KEDIA
ENV PYTHONUNBUFFERED 1
COPY ./requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
RUN mkdir /app
WORKDIR /app
COPY ./app /app
RUN adduser -D user
USER user
在运行 docker build . 时,它显示以下错误:
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ug5tncvh/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-zziwp791/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-wpkwq_6g/overlay --compile" failed with error code 1 in /tmp/pip-install-ug5tncvh/numpy/
----------------------------------------
如何修复此错误?或者有没有其他方法可以下载requirements.txt?
我使用 macos HighSierra 10.13.2。
我是 docker 新手,请帮忙。
森林海
大话西游666
相关分类