泊坞窗构建似乎安装非PIP Python包
问题描述:
我有一些非PIP封装,泊坞窗构建似乎安装非PIP Python包
,我已经写了我的requirements.txt当挂起:
git+https://github.com/manahl/arctic.git
这似乎好的工作在我的本地,但是当我做搬运工构建我得到这个:
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
这没有起作用,在这种情况下,它只是不能requirements.txt找到。你为什么认为这会起作用? (这可能会帮我弄明白) – cjm2671
我将requirements.txt复制到应用程序文件夹,并且工作顺利。 – vegiops
删除pip安装行并构建您的容器,然后尝试手动执行pip安装步骤。 – vegiops