From c26b9a63cbadaab4a55cfbd982a6b29a3e21a051 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 19:15:02 -0400 Subject: [PATCH 01/12] use cuda image --- docker/eva_jenkins.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 34558ffca7..6d39807330 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -1,5 +1,5 @@ # https://www.jenkins.io/doc/book/installing/docker/ - Follow these steps for starting jenkins. -FROM python:3.8 +FROM nvidia/cuda:11.2.2-devel-ubuntu20.04 ENV OPENCV_VERSION="4.5.1" From f97354b584f94bb258e0da0a640c670a9fda3896 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 19:36:44 -0400 Subject: [PATCH 02/12] turn on cuda --- docker/eva_jenkins.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 6d39807330..6d0917dc6d 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -36,7 +36,7 @@ RUN apt-get -qq update \ && cmake \ -D BUILD_TIFF=ON \ -D BUILD_opencv_java=OFF \ - -D WITH_CUDA=OFF \ + -D WITH_CUDA=ON \ -D WITH_OPENGL=ON \ -D WITH_OPENCL=ON \ -D WITH_IPP=ON \ From edb0efc7d9a1a903564793fd5ebf723dd55d7fc0 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 19:37:30 -0400 Subject: [PATCH 03/12] random change --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 790272662d..cc2ba8a966 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { } stages { - stage('Setup and Install Packages') { + stage('Setup and Install EVA Packages') { parallel { stage('Setup Virtual Environment') { steps { From 408aeb7a2fa585a2fa14ad28de6e558979f8d1d2 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 20:59:53 -0400 Subject: [PATCH 04/12] edit docker file --- docker/eva_jenkins.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 6d0917dc6d..5fd423db40 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -1,5 +1,5 @@ # https://www.jenkins.io/doc/book/installing/docker/ - Follow these steps for starting jenkins. -FROM nvidia/cuda:11.2.2-devel-ubuntu20.04 +FROM nvidia/cuda ENV OPENCV_VERSION="4.5.1" From 7214263398d70ef60f6edb373e0464d5e2511d05 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 23:24:05 -0400 Subject: [PATCH 05/12] noninteractive --- docker/eva_jenkins.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 5fd423db40..92627ce132 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -4,8 +4,8 @@ FROM nvidia/cuda ENV OPENCV_VERSION="4.5.1" # OpenCV Specific Installation -RUN apt-get -qq update \ - && apt-get -qq install -y --no-install-recommends \ +RUN apt-get -qq update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \ build-essential \ cmake \ git \ From 48f53b539711be252deef52c6303d97d141c1e95 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 23:24:22 -0400 Subject: [PATCH 06/12] add version --- docker/eva_jenkins.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 92627ce132..dc96c852c4 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -1,5 +1,5 @@ # https://www.jenkins.io/doc/book/installing/docker/ - Follow these steps for starting jenkins. -FROM nvidia/cuda +FROM nvidia/cuda:11.2.2-devel-ubuntu20.04 ENV OPENCV_VERSION="4.5.1" From 59093b8166cf1e62509d0935fb50a788d1fb5237 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Tue, 1 Nov 2022 23:51:56 -0400 Subject: [PATCH 07/12] install py dependencies --- docker/eva_jenkins.Dockerfile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index dc96c852c4..66fad67d16 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -3,9 +3,23 @@ FROM nvidia/cuda:11.2.2-devel-ubuntu20.04 ENV OPENCV_VERSION="4.5.1" +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + python3-numpy \ + python3-pip \ + python3-pytest \ + python3-pytest-cov \ + python3-venv \ + python3-yaml \ + ffmpeg \ + && \ + apt-get autoremove --purge -y && \ + apt-get autoclean -y && \ + rm -rf /var/cache/apt/* /var/lib/apt/lists/* + # OpenCV Specific Installation RUN apt-get -qq update && \ - DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \ + apt-get -qq install -y --no-install-recommends \ build-essential \ cmake \ git \ From 0678affbbd8c431608992ece200b3918151fda91 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Wed, 2 Nov 2022 00:33:33 -0400 Subject: [PATCH 08/12] redo installs --- Jenkinsfile | 2 -- docker/eva_jenkins.Dockerfile | 41 +---------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cc2ba8a966..27d1a5461c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,8 +15,6 @@ pipeline { pip install --upgrade pip pip install scikit-build pip install cython -pip install flake8==3.9.0 pytest==6.1.2 pytest-cov==2.11.1 mock==4.0.3 coveralls==3.0.1 -pip install torch==1.10.2 torchvision==0.11.3 facenet_pytorch==2.5.2 easyocr==1.5.0 python setup.py install''' } } diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 66fad67d16..c4af7fe569 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -43,46 +43,7 @@ RUN apt-get -qq update && \ sudo \ openjdk-11-jdk \ openjdk-11-jre \ - && pip install numpy \ - && wget -q https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip -O opencv.zip \ - && unzip -qq opencv.zip -d /opt \ - && rm -rf opencv.zip \ - && cmake \ - -D BUILD_TIFF=ON \ - -D BUILD_opencv_java=OFF \ - -D WITH_CUDA=ON \ - -D WITH_OPENGL=ON \ - -D WITH_OPENCL=ON \ - -D WITH_IPP=ON \ - -D WITH_TBB=ON \ - -D WITH_EIGEN=ON \ - -D WITH_V4L=ON \ - -D BUILD_TESTS=OFF \ - -D BUILD_PERF_TESTS=OFF \ - -D CMAKE_BUILD_TYPE=RELEASE \ - -D CMAKE_INSTALL_PREFIX=$(python3.8 -c "import sys; print(sys.prefix)") \ - -D PYTHON_EXECUTABLE=$(which python3.8) \ - -D PYTHON_INCLUDE_DIR=$(python3.8 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -D PYTHON_PACKAGES_PATH=$(python3.8 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ - /opt/opencv-${OPENCV_VERSION} \ - && make -j$(nproc) \ - && make install \ - && rm -rf /opt/build/* \ - && rm -rf /opt/opencv-${OPENCV_VERSION} - -# Install Java11 (Direct Download) because java-8 is no longer supported -RUN wget https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz && \ - mkdir /opt/jdk-11 && \ - tar -zxf openjdk-11_linux-x64_bin.tar.gz -C /opt/jdk-11 - -# Add Jenkins user, For Spark Authentication (cannot be done without user) -RUN groupadd --gid 1000 jenkins && \ - useradd --uid 1000 --gid jenkins --shell /bin/bash --home-dir /var/jenkins_home jenkins && \ - mkdir /var/jenkins_home && \ - chown 1000:1000 /var/jenkins_home && \ - echo 'jenkins ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-jenkins && \ - echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep - + && pip install numpy # Give Permission To Home Directory To Create EVA RUN mkdir /.eva && chmod -R 777 /.eva From 217d09218f222040efcf9d7d588b06d4ecf4c8e6 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Wed, 2 Nov 2022 00:36:45 -0400 Subject: [PATCH 09/12] remove unnecessary --- docker/eva_jenkins.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index c4af7fe569..0dd972576f 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -3,6 +3,7 @@ FROM nvidia/cuda:11.2.2-devel-ubuntu20.04 ENV OPENCV_VERSION="4.5.1" +# Docker image specific installation RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ python3-numpy \ @@ -42,8 +43,7 @@ RUN apt-get -qq update && \ python3-dev \ sudo \ openjdk-11-jdk \ - openjdk-11-jre \ - && pip install numpy + openjdk-11-jre # Give Permission To Home Directory To Create EVA RUN mkdir /.eva && chmod -R 777 /.eva From 8a14302c939ef3dba131135152136a6fa15075cf Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Wed, 2 Nov 2022 01:01:08 -0400 Subject: [PATCH 10/12] chmod --- docker/eva_jenkins.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index 0dd972576f..bd4936fe17 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -47,3 +47,4 @@ RUN apt-get -qq update && \ # Give Permission To Home Directory To Create EVA RUN mkdir /.eva && chmod -R 777 /.eva +RUN mkdir /.cache && chmod -R 777 /.cache \ No newline at end of file From 771ba1d0f14e182853b899e84093e578addb50bf Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Wed, 2 Nov 2022 01:23:38 -0400 Subject: [PATCH 11/12] chmod easyocr --- docker/eva_jenkins.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/eva_jenkins.Dockerfile b/docker/eva_jenkins.Dockerfile index bd4936fe17..dd5154feac 100644 --- a/docker/eva_jenkins.Dockerfile +++ b/docker/eva_jenkins.Dockerfile @@ -47,4 +47,5 @@ RUN apt-get -qq update && \ # Give Permission To Home Directory To Create EVA RUN mkdir /.eva && chmod -R 777 /.eva -RUN mkdir /.cache && chmod -R 777 /.cache \ No newline at end of file +RUN mkdir /.cache && chmod -R 777 /.cache +RUN mkdir /.EasyOCR && chmod -R 777 /.EasyOCR \ No newline at end of file From a46eaced72eb5c0865e94155d5c9498c55863d79 Mon Sep 17 00:00:00 2001 From: Kaushik Ravichandran Date: Wed, 2 Nov 2022 01:29:50 -0400 Subject: [PATCH 12/12] undo random change --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e2c8dd04c1..a8210f3238 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { } stages { - stage('Setup and Install EVA Packages') { + stage('Setup and Install Packages') { parallel { stage('Setup Virtual Environment') { steps {