This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-automator
53 lines (45 loc) · 1.71 KB
/
Dockerfile-automator
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM node:12-stretch
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
# Install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-utils \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends python python-dev python-pip build-essential cmake git pkg-config libjpeg62-turbo-dev libtiff5-dev libpng-dev libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libatlas-base-dev gfortran libavresample-dev libgphoto2-dev libgstreamer-plugins-base1.0-dev libdc1394-22-dev \
&& apt-get install -y cmake git pkg-config \
&& apt-get install -y libboost-all-dev \
&& apt-get install -y ffmpeg x264 x265 \
&& apt-get install -y libjsoncpp-dev \
&& apt-get install -y yarn \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Build OpenCV
RUN cd /opt \
&& wget https://github.com/opencv/opencv/archive/3.4.0.zip -O opencv-3.4.0.zip
RUN cd /opt && unzip opencv-3.4.0.zip \
&& cd opencv-3.4.0 \
&& mkdir build \
&& cd build \
&& cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF /opt/opencv-3.4.0 \
&& make -j $(nproc) \
&& make install \
&& ldconfig \
&& rm -rf /opt/opencv*
# Build animeloop-cli
RUN git clone https://github.com/moeoverflow/animeloop-cli.git \
&& cd animeloop-cli \
&& git submodule init && git submodule update \
&& mkdir build && cd build \
&& cmake .. \
&& make animeloop-cli \
&& cp /animeloop-cli/build/animeloop-cli /usr/bin \
&& chmod +x /usr/bin/animeloop-cli
WORKDIR /usr/src/app
COPY . .
COPY package*.json .
RUN yarn \
&& yarn build
CMD ["yarn", "start:automator"]