-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-opencv
30 lines (22 loc) · 1.1 KB
/
Dockerfile-opencv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM public.ecr.aws/zebrunner/appium:2.1
ENV APPIUM_PLUGINS=images
RUN appium plugin list && \
appium plugin install $APPIUM_PLUGINS
# Install OpenCV prerequisites
RUN apt-get update && apt-get -y install git cmake build-essential libopencv-dev python3-opencv
## Install OpenCV
ENV OPENCV4NODEJS_AUTOBUILD_FLAGS=-DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui,video,calib3d,features2d,objdetect,dnn,ml,flann,photo,stitching,gapi
RUN npm install opencv-build@0.1.9
ENV OPENCV_INCLUDE_DIR=/root/node_modules/opencv-build/opencv/build/include
ENV OPENCV_LIB_DIR=/root/node_modules/opencv-build/opencv/build/lib
ENV OPENCV_BIN_DIR=/root/node_modules/opencv-build/opencv/build/bin
ENV PATH=$OPENCV_BIN_DIR:$PATH
ENV OPENCV4NODEJS_AUTOBUILD_OPENCV_VERSION=5.6.0
RUN npm install opencv4nodejs
RUN ln -s -f /home/androidusr/node_modules/opencv4nodejs /usr/lib/node_modules/appium/node_modules/
# to verify opencv4nodejs is accessible run below command inside appium conatiner:
#node
#Welcome to Node.js v18.16.1.
#Type ".help" for more information.
#> require('opencv4nodejs')
#-> no error about module not found!