forked from BurguerJohn/Dain-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
87 lines (77 loc) · 2.55 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
FROM nvidia/cuda:11.1-cudnn8-devel-ubuntu20.04
RUN apt-get update && apt-get install -y \
gcc-9 \
g++-9 &&\
rm /usr/bin/gcc && rm /usr/bin/g++ && \
ln -s /usr/bin/gcc-9 /usr/bin/gcc && ln -s /usr/bin/g++-9 /usr/bin/g++ && \
rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
RUN truncate -s0 /tmp/preseed.cfg; \
echo "tzdata tzdata/Areas select Europe" >> /tmp/preseed.cfg; \
echo "tzdata tzdata/Zones/Europe select Berlin" >> /tmp/preseed.cfg; \
debconf-set-selections /tmp/preseed.cfg && \
rm -f /etc/timezone /etc/localtime && \
apt-get update && apt-get install -y \
software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get install -y \
# DAIN App dependancys
python3.8 \
# ffmpeg dependencys
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libgnutls28-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
pkg-config \
texinfo \
wget \
yasm \
zlib1g-dev \
unzip \
libnuma1 \
libnuma-dev &&\
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
gcc-8 \
g++-8 &&\
rm /usr/bin/gcc && rm /usr/bin/g++ && \
ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++
WORKDIR /tmp
# ffmpeg compile
RUN git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git && \
cd nv-codec-headers && make install && cd - && \
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/
RUN cd ffmpeg && \
sed -i 's/compute_30/compute_35/' configure && sed -i 's/sm_30/sm_35/' configure &&\
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure \
--enable-cuda-nvcc \
--enable-cuda-llvm \
--enable-cuda \
--enable-filter=thumbnail_cuda \
--enable-cuvid \
--enable-nvenc \
--enable-nonfree \
--enable-libnpp \
--extra-cflags=-I/usr/local/cuda/include \
--extra-ldflags=-L/usr/local/cuda/lib64 && \
make -j 2 && \
make install
# # create DAIN-App user
# RUN groupadd -r DAIN-App && useradd --no-log-init -r -g DAIN-App DAIN-App
# USER DAIN-App
# WORKDIR /DAIN-App
# COPY requirements.txt /tmp/
# RUN pip install --requirement /tmp/requirements.txt