我有一些非pip包,
我已经写进了我的要求.txt作为:
git+https://github.com/manahl/arctic.git
这似乎在我的本地主机上工作正常,但是当我进行 docker 构建时,我得到这个:
Collecting git+https://github.com/manahl/arctic.git (from -r scripts/requirements.txt (line 11))
│ Cloning https://github.com/manahl/arctic.git to /tmp/pip-1gw7spz2-build
它似乎只是挂起了。几分钟后,它静静地继续前进,但看起来它根本没有工作。它似乎为每个基于 git 的依赖项执行此操作。
我做错了什么?
Dockerfile:
FROM python:3.6.1
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
RUN apt-get update && apt-get install -y
git
build-essential
# Install any needed packages specified in requirements.txt
RUN pip install -r scripts/requirements.txt
# Run app.py when the container launches
CMD ["python", "scheduler.py"]
如果当前目录中存在scripts
文件夹,请尝试RUN pip install -r /scripts/requirements.txt