quic / aimet

AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.
https://quic.github.io/aimet-pages/index.html
Other
2.13k stars 382 forks source link

Cannot find opencv_320_python38.patch in docker file #1731

Open dinghuanghao opened 1 year ago

dinghuanghao commented 1 year ago

Encountered the following error when using pre-build docker

……
Step 19/38 : COPY opencv_320_python38.patch /tmp
COPY failed: stat /var/lib/docker/tmp/docker-builder738879406/opencv_320_python38.patch: no such file or directory

aimet/Jenkins/Dockerfile.torch-cpu

# Ref: https://docs.opencv.org/3.2.0/d7/d9f/tutorial_linux_install.html
COPY opencv_320_python38.patch /tmp
RUN wget -q https://github.com/Itseez/opencv/archive/3.2.0.tar.gz -O /tmp/3.2.0.tar.gz > /dev/null && \
    tar -C /tmp -xvf /tmp/3.2.0.tar.gz > /dev/null && \
……
uzzal-podder commented 1 year ago

Same problem

Step 21/40 : COPY opencv_320_python38.patch /tmp
COPY failed: file not found in build context or excluded by .dockerignore: stat opencv_320_python38.patch: file does not exist
quic-bharathr commented 1 year ago

Hi @dinghuanghao and @uzzal-podder , apologies for the delayed response. The patch file that it complains about is here: https://github.com/quic/aimet/tree/develop/Jenkins. From which directory are you trying to build the docker image from? Can you also send the command that you're using?

theoctopusride commented 11 months ago

Sorry to bother, but how do you use the patch file when running into the issue below? Thank you for your help.

~/Downloads/aimet_docker_workspace$ docker build -t ${docker_image_name} -f $WORKSPACE/aimet/Jenkins/Dockerfile.${AIMET_VARIANT} .
[+] Building 3.8s (19/40)                                                                                                                                                  docker:default
 => [internal] load build definition from Dockerfile.torch-gpu                                                                                                                       0.2s
 => => transferring dockerfile: 11.14kB                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                    0.2s
 => => transferring context: 2B                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04                                                                                               2.3s
 => CANCELED [ 1/36] FROM docker.io/nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04@sha256:72d9b042337ea385b36d40638e8cbe1968f098773be49493ccef8b95f069711d                              0.7s
 => => resolve docker.io/nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04@sha256:72d9b042337ea385b36d40638e8cbe1968f098773be49493ccef8b95f069711d                                         0.2s
 => => sha256:72d9b042337ea385b36d40638e8cbe1968f098773be49493ccef8b95f069711d 743B / 743B                                                                                           0.0s
 => => sha256:77532dc0c82a1914809de4afde61840b94549c133583c3312a91e01d3942e1cd 2.84kB / 2.84kB                                                                                       0.0s
 => => sha256:6d27baada7f62c8ea0f1a155a80976c2a04ff4a3047ff810730b89fed9ce9b19 17.89kB / 17.89kB                                                                                     0.0s
 => [internal] load build context                                                                                                                                                    0.2s
 => => transferring context: 2B                                                                                                                                                      0.0s
 => CACHED [ 2/36] RUN mv /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/cuda.list.orig &&     apt-get update > /dev/null &&     apt-get install -y --no-install-recomme  0.0s
 => CACHED [ 3/36] RUN apt-get update > /dev/null &&     apt-get install --no-install-recommends -y         ca-certificates         git         ssh         sudo         wget        0.0s
 => CACHED [ 4/36] RUN sudo update-ca-certificates                                                                                                                                   0.0s
 => CACHED [ 5/36] RUN echo "%users ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers                                                                                                       0.0s
 => CACHED [ 6/36] RUN apt-get update -y > /dev/null &&     apt-get install --no-install-recommends -y         python3.8         python3.8-dev         python3.8-venv         pytho  0.0s
 => CACHED [ 7/36] RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1                                                                                   0.0s
 => CACHED [ 8/36] RUN update-alternatives --set python3 /usr/bin/python3.8                                                                                                          0.0s
 => CACHED [ 9/36] RUN python3 -m pip --no-cache-dir install --upgrade         pip         setuptools==41.0.1         wheel==0.33.4                                                  0.0s
 => CACHED [10/36] RUN dpkg --add-architecture i386                                                                                                                                  0.0s
 => CACHED [11/36] RUN apt-get update > /dev/null &&     apt-get install --no-install-recommends -y         build-essential         emacs         environment-modules         less   0.0s
 => CACHED [12/36] RUN python3 -m pip --no-cache-dir install         astroid==2.5.3         attrs>=19.1.0         behave==1.2.6         blosc==1.10.1         cffi==1.12.3           0.0s
 => CACHED [13/36] RUN mkdir -p /opt/cmake  &&      wget -P /tmp https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh &&     sh /tmp/cmake-3.19.  0.0s
 => CACHED [14/36] RUN mkdir /opt/onnxruntime &&     export ONNXRUNTIME_VER=$(python3 -c 'import onnxruntime; print(onnxruntime.__version__)') &&     wget -qO- "https://github.com  0.0s
 => ERROR [15/36] COPY opencv_320_python38.patch /tmp                                                                                                                                0.0s
------
 > [15/36] COPY opencv_320_python38.patch /tmp:
------
Dockerfile.torch-gpu:219
--------------------
 217 |     # Opencv
 218 |     # Ref: https://docs.opencv.org/3.2.0/d7/d9f/tutorial_linux_install.html
 219 | >>> COPY opencv_320_python38.patch /tmp
 220 |     RUN wget -q https://github.com/Itseez/opencv/archive/3.2.0.tar.gz -O /tmp/3.2.0.tar.gz > /dev/null && \
 221 |         tar -C /tmp -xvf /tmp/3.2.0.tar.gz > /dev/null && \
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 67693da2-288d-4f45-b1e1-bff30aa4ec3b::u2vhn67wglwi7qmm2pumymmop: "/opencv_320_python38.patch": not found

EDIT: Nevermind, it appears I just had to copy the patch file to the root directory of my workspace...

sandeep1404 commented 8 months ago

HI, even i had the same issue, can you help me in resolving the issue.

1826133674 commented 5 months ago

HI, even i had the same issue, can you help me in resolving the issue. @sandeep1404 Did you sovle the problem?

1826133674 commented 5 months ago

HI, even i had the same issue, can you help me in resolving the issue.

You can download the patch from this link https://github.com/quic/aimet/blob/develop/Jenkins/opencv_320_python38.patch