0

I'm trying to build an image from the following (abridged) Docker file:

FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
LABEL maintainer caffe-maint@googlegroups.com


RUN apt-get update && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        wget \
        libatlas-base-dev \
        libboost-all-dev \
        libgflags-dev \
        libgoogle-glog-dev \
        libhdf5-serial-dev \
        libleveldb-dev \
        liblmdb-dev \
        libopencv-dev \
        libprotobuf-dev \
        libsnappy-dev \
        protobuf-compiler \
        python-dev \
        python-numpy \
        python-pip \
        python-setuptools \
        python-scipy && \
    rm -rf /var/lib/apt/lists/*


ENV CAFFE_ROOT=/opt/caffe
WORKDIR $CAFFE_ROOT

# FIXME: use ARG instead of ENV once DockerHub supports this
# https://github.com/docker/hub-feedback/issues/460
ENV CLONE_TAG=1.0

RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \
    pip install --upgrade pip

However, when I run docker build . -t='docker_t3', I get the following error:

Collecting pip
  Downloading https://files.pythonhosted.org/packages/33/c9/e2164122d365d8f823213a53970fa3005eb16218edcfc56ca24cb6deba2b/pip-22.0.4.tar.gz (2.1MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-YHY519/pip/setup.py", line 7
        def read(rel_path: str) -> str:
                         ^
SyntaxError: invalid syntax

   ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YHY519/pip/
You are using pip version 8.1.1, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Since the command that crashed the build was pip install --upgrade pip I'm not certain how to avoid crashing when the error message is You should consider upgrading via the 'pip install --upgrade pip' command.

What should I do?

user1245262
  • 6,968
  • 8
  • 50
  • 77

0 Answers0