Skip to content

Commit 7beca0f

Browse files
authored
Merge pull request #4 from moeoverflow/feature/docker
Add Docker support
2 parents 25c0216 + 572548a commit 7beca0f

File tree

2 files changed

+59
-4
lines changed

2 files changed

+59
-4
lines changed

Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update \
4+
&& apt-get upgrade -y \
5+
&& apt-get install -y --no-install-recommends python python-dev python-pip build-essential cmake git pkg-config libjpeg8-dev libtiff5-dev libjasper-dev libpng12-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 \
6+
&& cd /opt \
7+
&& git clone https://github.com/opencv/opencv.git \
8+
&& cd opencv \
9+
&& git checkout 3.4.0 \
10+
&& mkdir build \
11+
&& cd build \
12+
&& cmake \
13+
-D CMAKE_BUILD_TYPE=RELEASE \
14+
-D CMAKE_INSTALL_PREFIX=/usr/local \
15+
-D INSTALL_C_EXAMPLES=OFF \
16+
-D INSTALL_PYTHON_EXAMPLES=OFF \
17+
-D BUILD_EXAMPLES=OFF /opt/opencv \
18+
&& make -j $(nproc) \
19+
&& make install \
20+
&& ldconfig \
21+
&& rm -rf /opt/opencv*
22+
23+
# Install animeloop-cli required packages
24+
RUN apt-get install -y cmake git pkg-config \
25+
&& apt-get install -y libboost-all-dev \
26+
&& apt-get install -y ffmpeg x264 x265 \
27+
&& apt-get install -y libjsoncpp-dev \
28+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
29+
30+
# Build animeloop-cli
31+
RUN git clone https://github.com/moeoverflow/animeloop-cli.git \
32+
&& cd animeloop-cli \
33+
&& git submodule init && git submodule update \
34+
&& mkdir build && cd build \
35+
&& cmake .. \
36+
&& make animeloop-cli \
37+
&& cp /animeloop-cli/build/animeloop-cli /usr/bin \
38+
&& chmod +x /usr/bin/animeloop-cli
39+
40+
ENTRYPOINT [ "/usr/bin/animeloop-cli"]

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ Animeloop command line tool. The goal of this project is to automatically find a
1111
yaourt -S animeloop-cli
1212
```
1313

14+
### Docker
15+
16+
```Shell
17+
docker build -t animeloop-cli .
18+
19+
# You should change these path: /path/to/input/file.mp4 and /path/to/ouput
20+
docker run \
21+
-v /path/to/input/file.mp4:/data/file.mp4 \
22+
-v /path/to/ouput:/loops \
23+
--rm \
24+
animeloop-cli \
25+
-i /data/file.mp4 \
26+
-o /loops
27+
```
28+
1429
### Install manually
1530

1631
#### Modules Init
@@ -128,19 +143,19 @@ unzip -p ffmpeg-3.4.2-win64-static.zip ffmpeg-3.4.2-win64-static/bin/ffmpeg.exe
128143
##### Windows via Microsoft Visual Studio
129144

130145
- Download and install [Microsoft Visual Studio](https://visualstudio.microsoft.com/)
131-
146+
132147
> Will uses Visual Studio 2015 Enterprise (VC14) as example for below.
133-
148+
134149
- Download [CMake-GUI](https://cmake.org/download/)
135150

136151
- Download [Boost prebuilt library](https://sourceforge.net/projects/boost/files/boost-binaries/) for VC14
137152

138153
> You may need a older version (< 1.66.0) in case of some unknown bug.
139-
154+
140155
- Download [OpenCV prebuilt library](https://opencv.org/releases/) for Windows
141156

142157
> OpenCV should be 3.2+ but not 4.x
143-
158+
144159
- Download [HDF5 prebuilt library](https://www.hdfgroup.org/downloads/hdf5) for VC14
145160
> You may need an account to download the file, you can register for free or build your own.
146161
> If you don't want to install the msi package, run `msiexec /a drive:\path\to\file.msi /qb TARGETDIR=drive:\path\to\extract`

0 commit comments

Comments
 (0)