cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.26k stars 2.95k forks source link

Build docker-image error #1285

Closed shreyak2598 closed 4 years ago

shreyak2598 commented 4 years ago

Hello, The command 'sudo docker-compose build' gives the following error:

FROM ubuntu:16.04 ERROR: Service 'cvat' failed to build: The command '/bin/sh -c python3 -m pip install --no-cache-dir -r ${HOME}/datumaro/requirements.txt' returned a non-zero code: 2

I'm using develop branch. How can I resolve this? thank you

The full error is: abhi@abhi-HP-Pavilion-Notebook:~/cvat$ sudo docker-compose build cvat_redis uses an image, skipping cvat_db uses an image, skipping cvat_proxy uses an image, skipping Building cvat Step 1/53 : FROM ubuntu:16.04 ---> 77be327e4b63 Step 2/53 : ARG http_proxy ---> Using cache ---> e98d37be6fe6 Step 3/53 : ARG https_proxy ---> Using cache ---> ef3eab1ce718 Step 4/53 : ARG no_proxy ---> Using cache ---> 48b57e8171e2 Step 5/53 : ARG socks_proxy ---> Using cache ---> 940a6b1e7a54 Step 6/53 : ARG TZ ---> Using cache ---> d9ea3e19b069 Step 7/53 : ENV TERM=xterm http_proxy=${http_proxy} https_proxy=${https_proxy} no_proxy=${no_proxy} socks_proxy=${socks_proxy} LANG='C.UTF-8' LC_ALL='C.UTF-8' TZ=${TZ} ---> Using cache ---> 72b644921323 Step 8/53 : ARG USER ---> Using cache ---> 73a2b5a7748b Step 9/53 : ARG DJANGO_CONFIGURATION ---> Using cache ---> 865ca9b73ea3 Step 10/53 : ENV DJANGO_CONFIGURATION=${DJANGO_CONFIGURATION} ---> Using cache ---> ab4b01288708 Step 11/53 : RUN apt-get update && apt-get --no-install-recommends install -yq software-properties-common && add-apt-repository ppa:mc3man/xerus-media -y && add-apt-repository ppa:mc3man/gstffmpeg-keep -y && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -yq apache2 apache2-dev apt-utils build-essential libapache2-mod-xsendfile supervisor ffmpeg gstreamer0.10-ffmpeg libldap2-dev libsasl2-dev python3-dev python3-pip tzdata p7zip-full git ssh poppler-utils curl && curl https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && apt-get --no-install-recommends install -y git-lfs && git lfs install && if [ -z ${socks_proxy} ]; then echo export "GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30\"" >> ${HOME}/.bashrc; else echo export "GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o ProxyCommand='nc -X 5 -x ${socks_proxy} %h %p'\"" >> ${HOME}/.bashrc; fi && python3 -m pip install --no-cache-dir -U pip==20.0.1 setuptools && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && dpkg-reconfigure -f noninteractive tzdata && add-apt-repository --remove ppa:mc3man/gstffmpeg-keep -y && add-apt-repository --remove ppa:mc3man/xerus-media -y && rm -rf /var/lib/apt/lists/* ---> Using cache ---> 28381343e639 Step 12/53 : ENV USER=${USER} ---> Using cache ---> 1a83aac976c8 Step 13/53 : ENV HOME /home/${USER} ---> Using cache ---> fd0cdcae73ad Step 14/53 : WORKDIR ${HOME} ---> Using cache ---> 20f22e75db07 Step 15/53 : RUN adduser --shell /bin/bash --disabled-password --gecos "" ${USER} ---> Using cache ---> 02bfe7ac8d1f Step 16/53 : COPY components /tmp/components ---> Using cache ---> 55a86437bd84 Step 17/53 : ARG OPENVINO_TOOLKIT ---> Using cache ---> ce59e2adcf2e Step 18/53 : ENV OPENVINO_TOOLKIT=${OPENVINO_TOOLKIT} ---> Using cache ---> 7a1787f6afbe Step 19/53 : ENV REID_MODEL_DIR=${HOME}/reid ---> Using cache ---> 92bbe0c85cb1 Step 20/53 : RUN if [ "$OPENVINO_TOOLKIT" = "yes" ]; then /tmp/components/openvino/install.sh && mkdir ${REID_MODEL_DIR} && curl https://download.01.org/openvinotoolkit/2018_R5/open_model_zoo/person-reidentification-retail-0079/FP32/person-reidentification-retail-0079.xml -o reid/reid.xml && curl https://download.01.org/openvinotoolkit/2018_R5/open_model_zoo/person-reidentification-retail-0079/FP32/person-reidentification-retail-0079.bin -o reid/reid.bin; fi ---> Using cache ---> 28639e52b77e Step 21/53 : ARG TF_ANNOTATION ---> Using cache ---> 830f821eea34 Step 22/53 : ENV TF_ANNOTATION=${TF_ANNOTATION} ---> Using cache ---> 9741429b01fe Step 23/53 : ENV TF_ANNOTATION_MODEL_PATH=${HOME}/rcnn/inference_graph ---> Using cache ---> 64103041ae5f Step 24/53 : RUN if [ "$TF_ANNOTATION" = "yes" ]; then bash -i /tmp/components/tf_annotation/install.sh; fi ---> Using cache ---> b264bdd88075 Step 25/53 : ARG AUTO_SEGMENTATION ---> Using cache ---> c4cef916fa0f Step 26/53 : ENV AUTO_SEGMENTATION=${AUTO_SEGMENTATION} ---> Using cache ---> 357138776573 Step 27/53 : ENV AUTO_SEGMENTATION_PATH=${HOME}/Mask_RCNN ---> Using cache ---> 44b3346705b3 Step 28/53 : RUN if [ "$AUTO_SEGMENTATION" = "yes" ]; then bash -i /tmp/components/auto_segmentation/install.sh; fi ---> Using cache ---> 96924779f873 Step 29/53 : COPY cvat/requirements/ /tmp/requirements/ ---> Using cache ---> ffc3d8999d56 Step 30/53 : COPY supervisord.conf mod_wsgi.conf wait-for-it.sh manage.py ${HOME}/ ---> Using cache ---> a4bda342fc7a Step 31/53 : RUN python3 -m pip install --no-cache-dir -r /tmp/requirements/${DJANGO_CONFIGURATION}.txt ---> Using cache ---> 8dc01baebc90 Step 32/53 : RUN python3 -m pip install --no-cache-dir pycocotools==2.0.0 ---> Using cache ---> 43c70e138ea0 Step 33/53 : ARG CUDA_SUPPORT ---> Using cache ---> 61e9ba6822ae Step 34/53 : ENV CUDA_SUPPORT=${CUDA_SUPPORT} ---> Using cache ---> 26ca396e9270 Step 35/53 : RUN if [ "$CUDA_SUPPORT" = "yes" ]; then /tmp/components/cuda/install.sh; fi ---> Using cache ---> aa3b3eaae7b3 Step 36/53 : ARG WITH_DEXTR ---> Using cache ---> b166efa55ff1 Step 37/53 : ENV WITH_DEXTR=${WITH_DEXTR} ---> Using cache ---> d30b90576a27 Step 38/53 : ENV DEXTR_MODEL_DIR=${HOME}/dextr ---> Using cache ---> 3b92bfd91037 Step 39/53 : RUN if [ "$WITH_DEXTR" = "yes" ]; then mkdir ${DEXTR_MODEL_DIR} -p && curl https://download.01.org/openvinotoolkit/models_contrib/cvat/dextr_model_v1.zip -o ${DEXTR_MODEL_DIR}/dextr.zip && 7z e ${DEXTR_MODEL_DIR}/dextr.zip -o${DEXTR_MODEL_DIR} && rm ${DEXTR_MODEL_DIR}/dextr.zip; fi ---> Using cache ---> 16e354158028 Step 40/53 : COPY ssh ${HOME}/.ssh ---> Using cache ---> 6c00a7feda10 Step 41/53 : COPY utils ${HOME}/utils ---> Using cache ---> 3b7c8af2bb73 Step 42/53 : COPY cvat/ ${HOME}/cvat ---> Using cache ---> 07ee7dedfdd1 Step 43/53 : COPY cvat-core/ ${HOME}/cvat-core ---> Using cache ---> a1800bb0116b Step 44/53 : COPY tests ${HOME}/tests ---> Using cache ---> 95321dbabc7c Step 45/53 : COPY datumaro/ ${HOME}/datumaro ---> Using cache ---> 85d08b267b62 Step 46/53 : RUN python3 -m pip install --no-cache-dir -r ${HOME}/datumaro/requirements.txt ---> Running in b2720fbb5c65 Requirement already satisfied: Cython>=0.27.3 in /usr/local/lib/python3.5/dist-packages (from -r /home/django/datumaro/requirements.txt (line 1)) (0.29.13) Requirement already satisfied: defusedxml>=0.6.0 in /usr/local/lib/python3.5/dist-packages (from -r /home/django/datumaro/requirements.txt (line 2)) (0.6.0) Requirement already satisfied: GitPython>=3.0.8 in /usr/local/lib/python3.5/dist-packages (from -r /home/django/datumaro/requirements.txt (line 3)) (3.0.8) Collecting lxml>=4.4.1 Downloading lxml-4.5.0-cp35-cp35m-manylinux1_x86_64.whl (5.7 MB) Requirement already satisfied: matplotlib<3.1 in /usr/local/lib/python3.5/dist-packages (from -r /home/django/datumaro/requirements.txt (line 5)) (3.0.3) Collecting opencv-python-headless>=4.1.0.25 Downloading opencv_python_headless-4.2.0.32-cp35-cp35m-manylinux1_x86_64.whl (21.6 MB) ERROR: Exception: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/response.py", line 425, in _error_catcher yield File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/response.py", line 507, in read data = self._fp.read(amt) if not fp_closed else b"" File "/usr/lib/python3.5/http/client.py", line 458, in read n = self.readinto(b) File "/usr/lib/python3.5/http/client.py", line 498, in readinto n = self.fp.readinto(b) File "/usr/lib/python3.5/socket.py", line 575, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.5/ssl.py", line 929, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.5/ssl.py", line 791, in read return self._sslobj.read(len, buffer) File "/usr/lib/python3.5/ssl.py", line 575, in read v = self._sslobj.read(len, buffer) socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main status = self.run(options, args) File "/usr/local/lib/python3.5/dist-packages/pip/_internal/commands/install.py", line 331, in run resolver.resolve(requirement_set) File "/usr/local/lib/python3.5/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/usr/local/lib/python3.5/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/local/lib/python3.5/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement(req) File "/usr/local/lib/python3.5/dist-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement hashes=hashes, File "/usr/local/lib/python3.5/dist-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url hashes=hashes, File "/usr/local/lib/python3.5/dist-packages/pip/_internal/operations/prepare.py", line 159, in unpack_http_url link, downloader, temp_dir.path, hashes File "/usr/local/lib/python3.5/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url for chunk in download.chunks: File "/usr/local/lib/python3.5/dist-packages/pip/_internal/utils/ui.py", line 160, in iter for x in it: File "/usr/local/lib/python3.5/dist-packages/pip/_internal/network/utils.py", line 39, in response_chunks decode_content=False, File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/response.py", line 564, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/response.py", line 529, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "/usr/lib/python3.5/contextlib.py", line 77, in exit self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/response.py", line 430, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. WARNING: You are using pip version 20.0.1; however, version 20.0.2 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command. ERROR: Service 'cvat' failed to build: The command '/bin/sh -c python3 -m pip install --no-cache-dir -r ${HOME}/datumaro/requirements.txt' returned a non-zero code: 2

shreyak2598 commented 4 years ago

solved

ThTaaa commented 4 years ago

I met the same problem, but I haven't solved it. How did you solve this problem? Thanks!

shreyak2598 commented 4 years ago

I performed post-installation steps to run docker without root permissions all the way upto docker run hello-world Then restarted the terminal and then the issue was resolved