-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
229 lines (211 loc) · 5.88 KB
/
Dockerfile
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
FROM ubuntu:19.10
ARG NASM_VER="2.14"
ARG YASM_VER="1.3.0"
ARG LAME_VER="3.100"
RUN set -xe && \
apt-get update && \
apt-get -y install software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y aptitude && \
aptitude update && \
aptitude install -y \
wget build-essential automake autoconf git libtool libvorbis-dev \
libass-dev libfreetype6-dev libsdl2-dev libva-dev libvdpau-dev \
libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev \
mercurial libnuma-dev texinfo zlib1g-dev \
cmake qtbase5-dev checkinstall gcc-9 g++-9 curl \
python3-pip ninja-build \
&&\
pip3 install meson
# nasm
RUN set -xe && \
cd /tmp && \
wget -O /tmp/nasm.tar.bz2 \
https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VER}/nasm-${NASM_VER}.tar.bz2 && \
mkdir -p /tmp/nasm && \
tar jxvf /tmp/nasm.tar.bz2 \
-C /tmp/nasm --strip-components 1 && \
cd /tmp/nasm && \
./autogen.sh && \
./configure --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
ldconfig
# yasm
RUN set -xe && \
cd /tmp && \
wget -O /tmp/yasm.tar.gz \
https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VER}.tar.gz && \
mkdir -p /tmp/yasm && \
tar xzvf /tmp/yasm.tar.gz \
-C /tmp/yasm --strip-components 1 && \
cd /tmp/yasm && \
./configure \
--prefix=/usr/local && \
make -j$(nproc) && \
make install && \
ldconfig
# l-smash
RUN set -xe && \
cd /tmp && \
git clone https://github.com/l-smash/l-smash.git && \
cd l-smash && \
./configure \
--enable-shared \
&& \
make && \
make install && \
ldconfig
# libx264
RUN set -xe && \
cd /tmp && \
git clone --depth 1 https://code.videolan.org/videolan/x264.git && \
cd /tmp/x264 && \
./configure \
--prefix=/usr/local \
--enable-shared \
--enable-pic \
&& \
make && \
make install && \
ldconfig
# libvpx
RUN set -xe && \
cd /tmp && \
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
cd /tmp/libvpx && \
./configure \
--disable-examples \
--disable-unit-tests \
--enable-vp9-highbitdepth \
--as=yasm \
&& \
make -j$(nproc) && \
make install && \
ldconfig
# libfdk-aac
RUN set -xe && \
cd /tmp && \
git clone --depth 1 https://github.com/mstorsjo/fdk-aac && \
cd fdk-aac && \
autoreconf -fiv && \
./configure \
&& \
make -j$(nproc) && \
make install && \
ldconfig
# libmp3lame
RUN set -xe && \
cd /tmp && \
wget -O /tmp/lame.tar.gz \
https://downloads.sourceforge.net/project/lame/lame/${LAME_VER}/lame-${LAME_VER}.tar.gz && \
mkdir -p /tmp/lame && \
tar xzvf /tmp/lame.tar.gz \
-C /tmp/lame --strip-components 1 && \
cd /tmp/lame && \
./configure \
--enable-shared \
--enable-nasm \
&& \
make -j$(nproc) && \
make install && \
ldconfig
# libopus
RUN set -xe && \
cd /tmp && \
git clone --depth 1 https://github.com/xiph/opus && \
cd opus && \
./autogen.sh && \
./configure \
--enable-shared \
&& \
make -j$(nproc) && \
make install && \
ldconfig
#AviSynth+
RUN set -xe && \
cd /tmp && \
git clone --depth 1 git://github.com/AviSynth/AviSynthPlus.git && \
cd AviSynthPlus && \
mkdir avisynth-build && \
cd avisynth-build && \
CC=gcc-9 CXX=gcc-9 LD=gcc-9 cmake ../ -G Ninja && \
ninja && \
checkinstall \
--pkgname=avisynth \
--pkgversion="$(grep -r \
Version avs_core/avisynth.pc | cut -f2 -d " ")-$(date --rfc-3339=date | \
sed 's/-//g')-git" \
--backup=no \
--deldoc=yes \
--delspec=yes \
--deldesc=yes \
--strip=yes \
--stripso=yes \
--addso=yes \
--fstrans=no \
--default ninja install
# FFmpeg
RUN set -xe && \
sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && \
apt-get update && \
apt-get -y build-dep ffmpeg && \
cd /tmp &&\
git clone --depth 1 git://git.ffmpeg.org/ffmpeg.git && \
cd /tmp/ffmpeg && \
./configure \
--enable-gpl\
--enable-version3 \
--disable-doc \
--disable-debug \
--enable-pic \
--enable-avisynth \
--enable-libx264 \
--enable-libx265 \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-nonfree \
&& \
make CC=gcc-9 CXX=gcc-9 LD=gcc-9 -j$(nproc) && \
checkinstall --pkgname=ffmpeg --pkgversion="7:$(git rev-list \
--count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes \
--delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default
#FFMS2
RUN set -xe && \
cd /tmp &&\
git clone --depth 1 git://github.com/ffms/ffms2.git && \
cd ffms2 && \
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig \
CPPFLAGS="-I/usr/local/include/avisynth" \
./autogen.sh --enable-shared --enable-avisynth && \
make -j$(nproc) && \
checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes \
--addso=yes --fstrans=no --default && \
ldconfig
# l-smash-source
RUN set -xe && \
cd /tmp &&\
git clone https://github.com/HolyWu/L-SMASH-Works.git && \
cd /tmp/L-SMASH-Works/AviSynth && \
git checkout 72d3eac802eebcfc9080009c1a8d47a747e3a306 &&\
CC=gcc-9 CXX=gcc-9 LD=gcc-9 LDFLAGS="-Wl,-Bsymbolic" meson build && \
cd build && \
ninja -v && \
ninja install && \
ldconfig
#install delogo
ADD src /tmp/src
RUN cd /tmp/src &&\
make CC=gcc-9 CXX=g++-9 LD=gcc-9 &&\
make install
RUN set -xe && \
apt-get clean && \
rm -r /tmp/*
WORKDIR /tmp/delogotrial