小编off*_*ll1的帖子

无法打开需求文件:[Errno 2] 没有这样的文件或目录:'requirements.txt'

我正在尝试在我的 ubuntu 18.04 机器上构建一个 docker 镜像,我在同一个构建目录中找到了requirements.txt,但它仍然显示这个错误。

无法打开需求文件:[Errno 2] 没有这样的文件或目录:'requirements.txt' 命令'/bin/sh -c pip3 install -r requirements.txt'返回非零代码:1

requirements.txt 是使用 pip3 安装 python 模块。

要求.txt:

numpy opencv-contrib-python opencv-python scikit-image 枕头 imutils scikit-learn matplotlib progressbar2 beautifulsoup4 pandas matplotlib re2 regex json argparse pickle

Docker 文件:

FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04

COPY requirements.txt /home/usr/app/requirements.txt
WORKDIR /home/usr/app/

RUN apt-get update && apt-get install -y python3 python3-pip sudo
RUN pip3 install -r requirements.txt

FROM tensorflow/tensorflow:latest-gpu-jupyter
Run Code Online (Sandbox Code Playgroud)

python docker dockerfile

3
推荐指数
1
解决办法
5058
查看次数

标签 统计

docker ×1

dockerfile ×1

python ×1