AllenTwilight 2022-11-06 12:21 采纳率: 100%
浏览 278
已结题

下载的dockerfile无法正常运行的一些问题

问题遇到的现象和发生背景

做课题要用一个视线追踪功能,想要记录一段时间内视线在屏幕上和看别处的分别时长,就从github下载了一个视线追踪项目。https://github.com/oveddan/runwayml-gazecapture 看到里面有一个dockerfile就试着在pycharm运行了一下,结果报错。以前没用过docker不太清楚是什么原因造成的,该怎么办。

用代码块功能插入代码,请勿粘贴截图

这是完整的dockerfile

FROM bvlc/caffe:cpu

WORKDIR /root

# download 
RUN wget https://ghproxy.com/https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_eye.xml -P data/
RUN wget https://ghproxy.com/https://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_frontalface_default.xml -P data/

RUN wget https://ghproxy.com/https://raw.githubusercontent.com/CSAILVision/GazeCapture/master/models/itracker_deploy.prototxt -P data/
RUN wget https://ghproxy.com/https://github.com/CSAILVision/GazeCapture/raw/master/models/snapshots/itracker25x_iter_92000.caffemodel -P data/
RUN wget https://ghproxy.com/https://github.com/CSAILVision/GazeCapture/raw/master/models/mean_images/mean_face_224.mat -P data/
RUN wget https://ghproxy.com/https://github.com/CSAILVision/GazeCapture/raw/master/models/mean_images/mean_left_224.mat -P data/
RUN wget https://ghproxy.com/https://github.com/CSAILVision/GazeCapture/raw/master/models/mean_images/mean_right_224.mat -P data/

ENV MODEL_DIR="/root/data/"
ENV OPENCV_DATA="/root/data/"

ADD setup_zero_mq.sh setup_zero_mq.sh 

RUN ./setup_zero_mq.sh

ENV GPU='false'

ADD requirements.txt requirements.txt

RUN pip install -r requirements.txt

EXPOSE 33000

ENTRYPOINT python ./src/server.py

这是完整的setup_zero_mq.sh

wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz

# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz

# Install dependency
sudo apt-get update && \
sudo apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev

# Create make file
cd zeromq-4.2.2
./configure

# Build and install(root permission only)
make install

# Install zeromq driver on linux
ldconfig

# Check installed
ldconfig -p | grep zmq

运行结果及报错内容

dockerfile就试着在pycharm运行了一下,结果报错如下

Step 13/18 : RUN ./setup_zero_mq.sh
 ---> Running in b21cbe2f5e17
--2022-11-06 03:26:32--  https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
Unable to establish SSL connection.
tar (child): zeromq-4.2.2.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
./setup_zero_mq.sh: 7: ./setup_zero_mq.sh: sudo: not found
./setup_zero_mq.sh: 11: cd: can't cd to zeromq-4.2.2
./setup_zero_mq.sh: 12: ./setup_zero_mq.sh: ./configure: not found
make: *** No rule to make target 'install'.  Stop.
Error response from daemon: The command '/bin/sh -c ./setup_zero_mq.sh' returned a non-zero code: 1
Failed to deploy '<unknown> Dockerfile: Dockerfile': Can't retrieve image ID from build stream

除了这个文件以外,单独运行/setup_zero_mq.sh也有报错

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\Users\Felix\Desktop\课题\runwayml-gazecapture-master> /bin/sh C:/Users/Felix/Desktop/课题/runwayml-gazecapture-master/setup
_zero_mq.sh
/bin/sh : 无法将“/bin/sh”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然
后再试一次。
所在位置 行:1 字符: 1
+ /bin/sh C:/Users/Felix/Desktop/课题/runwayml-gazecapture-master/setup_z ...
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (/bin/sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
PS C:\Users\Felix\Desktop\课题\runwayml-gazecapture-master> 
我的解答思路和尝试过的方法

先前raw.githubusercontent.com连接不上,所以加了https://ghproxy.com/ 代理,不知道是不是有影响。

我想要达到的结果

想实现“记录一段时间内视线在屏幕上和看别处的分别时长”的目的,能力有限没有找到别的简单的项目可供使用。还请不吝赐教。时间紧张,感激不尽。

  • 写回答

2条回答 默认 最新

  • Ko-walski 2022-11-06 13:47
    关注


    也可以了解下这个 安装贼简单。就一个Cmake 和 三个Python库我刚试了还可以

    img

    img


    请不要在意我的马赛克 哈哈

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 11月6日
  • 已采纳回答 11月6日
  • 创建了问题 11月6日

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况