前提・実現したいこと
Dockerでmediapipeのイメージのビルドからコンテナ起動までを実現したい。
mediapipeのビルドは下記を参考。
https://google.github.io/mediapipe/getting_started/install.html#installing-using-docker
発生している問題・エラーメッセージ
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 82, in __init__ req = Requirement(req) File "/usr/share/python-wheels/packaging-17.1-py2.py3-none-any.whl/packaging/requirements.py", line 97, in __init__ requirement_string[e.loc:e.loc + 8])) pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'=='" The command '/bin/sh -c pip3 install six == 1.14.0' returned a non-zero code: 1
該当のソースコード
iterm2
1git clone https://github.com/google/mediapipe.git 2cd mediapipe 3docker build -t dc_mediapipe /Users/440h/mediapipe/
iterm2
1ここでエラー発生 2docker build -t dc_mediapipe /Users/440h/mediapipe/
dockerfile
1FROM ubuntu:18.04 2 3MAINTAINER <mediapipe@google.com> 4 5WORKDIR /io 6WORKDIR /mediapipe 7 8ENV DEBIAN_FRONTEND=noninteractive 9 10RUN apt-get update && apt-get install -y --no-install-recommends \ 11 build-essential \ 12 gcc-8 g++-8 \ 13 ca-certificates \ 14 curl \ 15 ffmpeg \ 16 git \ 17 wget \ 18 unzip \ 19 python3-dev \ 20 python3-opencv \ 21 python3-pip \ 22 libopencv-core-dev \ 23 libopencv-highgui-dev \ 24 libopencv-imgproc-dev \ 25 libopencv-video-dev \ 26 libopencv-calib3d-dev \ 27 libopencv-features2d-dev \ 28 software-properties-common && \ 29 add-apt-repository -y ppa:openjdk-r/ppa && \ 30 apt-get update && apt-get install -y openjdk-8-jdk && \ 31 apt-get clean && \ 32 rm -rf /var/lib/apt/lists/* 33 34RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-8 35RUN pip3 install --upgrade setuptools 36RUN pip3 install wheel 37RUN pip3 install future 38RUN pip3 install six==1.14.0 39RUN pip3 install tensorflow==1.14.0 40RUN pip3 install tf_slim 41 42RUN ln -s /usr/bin/python3 /usr/bin/python 43 44# Install bazel 45ARG BAZEL_VERSION=3.7.2 46RUN mkdir /bazel && \ 47 wget --no-check-certificate -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/b\ 48azel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \ 49 wget --no-check-certificate -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \ 50 chmod +x /bazel/installer.sh && \ 51 /bazel/installer.sh && \ 52 rm -f /bazel/installer.sh 53 54COPY . /mediapipe/ 55 56# If we want the docker image to contain the pre-built object_detection_offline_demo binary, do the following 57# RUN bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/demo:object_detection_tensorflow_demo
requirement
1absl-py 2attrs>=19.1.0 3matplotlib 4numpy 5opencv-contrib-python 6protobuf>=3.11.4 7six 8wheel
試したこと
docker login してからやってみましたが結果は同じでした。
あなたの回答
tips
プレビュー