2021-01-18 02:13:24 +00:00
|
|
|
FROM archlinux:base-devel
|
|
|
|
|
2021-01-18 06:12:55 +00:00
|
|
|
ENV MPLCONFIGDIR="/home/app_user/"
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
# Fix keyring
|
|
|
|
RUN rm -fr /etc/pacman.d/gnupg && \
|
|
|
|
pacman-key --init && \
|
|
|
|
pacman-key --populate archlinux
|
|
|
|
|
|
|
|
# Create user
|
|
|
|
RUN useradd app_user --system --shell /usr/bin/nologin --create-home && \
|
|
|
|
echo "app_user ALL=(ALL) NOPASSWD: ALL" > "/etc/sudoers.d/allow_app_user"
|
|
|
|
|
|
|
|
# Speed up compile
|
|
|
|
RUN sed -i 's,^#MAKEFLAGS=.*,MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf
|
|
|
|
|
|
|
|
# Recommended to update entire base image due to rolling release
|
2021-01-31 21:20:23 +00:00
|
|
|
RUN pacman -Syu --noprogressbar --noconfirm
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
# Install requirements
|
2021-01-31 21:20:23 +00:00
|
|
|
RUN pacman -S --noprogressbar --noconfirm opencv opencv-samples hdf5 qt5-base git cmake yasm doxygen python python-pip go dpkg wget
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
# Install x265 and x264
|
2021-01-31 21:20:23 +00:00
|
|
|
RUN pacman -S --noprogressbar --noconfirm x265 x264
|
|
|
|
|
|
|
|
# Install makemkv vapoursynth
|
|
|
|
RUN pacman -S --noprogressbar --noconfirm mkvtoolnix-cli vapoursynth
|
|
|
|
|
|
|
|
# Install VTM
|
|
|
|
RUN git clone https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM.git /home/app_user/VTM && \
|
|
|
|
mkdir -p /home/app_user/VTM/build
|
|
|
|
WORKDIR /home/app_user/VTM/build
|
|
|
|
RUN cmake .. -DCMAKE_BUILD_TYPE=Release && \
|
|
|
|
make -j$(nproc) && \
|
|
|
|
ln -s ../bin/EncoderAppStatic /usr/local/bin/vvc_encoder
|
|
|
|
|
|
|
|
USER app_user
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
# Install aomenc
|
|
|
|
RUN git clone https://aur.archlinux.org/aom-git.git /home/app_user/aom-git
|
|
|
|
WORKDIR /home/app_user/aom-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
|
|
|
# Install rav1e
|
|
|
|
RUN git clone https://aur.archlinux.org/rav1e-git.git /home/app_user/rav1e-git
|
|
|
|
WORKDIR /home/app_user/rav1e-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
|
|
|
# Install svt-av1
|
|
|
|
RUN git clone https://aur.archlinux.org/svt-av1-git.git /home/app_user/svt-av1-git
|
|
|
|
WORKDIR /home/app_user/svt-av1-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
|
|
|
# Install svt-vp9
|
|
|
|
RUN git clone https://aur.archlinux.org/svt-vp9-git.git /home/app_user/svt-vp9-git
|
|
|
|
WORKDIR /home/app_user/svt-vp9-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
|
|
|
# Install vpx
|
|
|
|
RUN git clone https://aur.archlinux.org/libvpx-full-git.git /home/app_user/libvpx-full-git
|
|
|
|
WORKDIR /home/app_user/libvpx-full-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
|
|
|
# Install ffms2
|
|
|
|
RUN git clone https://aur.archlinux.org/ffms2-git.git /home/app_user/ffms2-git
|
|
|
|
WORKDIR /home/app_user/ffms2-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
|
|
|
# Install lsmash
|
|
|
|
RUN git clone https://aur.archlinux.org/vapoursynth-plugin-lsmashsource-git.git /home/app_user/vapoursynth-plugin-lsmashsource-git
|
|
|
|
WORKDIR /home/app_user/vapoursynth-plugin-lsmashsource-git
|
|
|
|
RUN yes | makepkg -sri
|
|
|
|
|
2021-01-31 21:20:23 +00:00
|
|
|
USER root
|
|
|
|
|
2021-01-18 02:13:24 +00:00
|
|
|
# Install av1an
|
|
|
|
COPY . /home/app_user/Av1an
|
|
|
|
WORKDIR /home/app_user/Av1an
|
2021-01-31 21:20:23 +00:00
|
|
|
RUN python setup.py install
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
# Change permissions
|
2021-01-31 21:20:23 +00:00
|
|
|
RUN chown app_user:app_user -R /home/app_user
|
|
|
|
|
|
|
|
USER app_user
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
VOLUME ["/videos"]
|
|
|
|
WORKDIR /videos
|
|
|
|
|
2021-01-18 06:12:55 +00:00
|
|
|
ENTRYPOINT [ "/home/app_user/Av1an/av1an.py" ]
|