2021-02-10 05:41:53 +00:00
|
|
|
FROM luigi311/encoders-docker:latest
|
2021-01-18 02:13:24 +00:00
|
|
|
|
2021-01-18 06:12:55 +00:00
|
|
|
ENV MPLCONFIGDIR="/home/app_user/"
|
2021-02-10 05:41:53 +00:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2021-05-16 01:05:18 +00:00
|
|
|
ARG DEPENDENCIES="mkvtoolnix curl python-is-python3 python3-venv"
|
2021-01-31 21:20:23 +00:00
|
|
|
|
2021-02-10 18:16:59 +00:00
|
|
|
# Install dependencies
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2021-05-16 01:05:18 +00:00
|
|
|
${DEPENDENCIES} && \
|
2021-02-10 18:16:59 +00:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2021-01-31 21:20:23 +00:00
|
|
|
# Install VTM
|
2021-05-15 06:09:01 +00:00
|
|
|
RUN git clone https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM.git /VTM && \
|
|
|
|
mkdir -p /VTM/build
|
|
|
|
WORKDIR /VTM/build
|
2021-01-31 21:20:23 +00:00
|
|
|
RUN cmake .. -DCMAKE_BUILD_TYPE=Release && \
|
2021-01-31 21:37:18 +00:00
|
|
|
make -j"$(nproc)" && \
|
2021-01-31 21:20:23 +00:00
|
|
|
ln -s ../bin/EncoderAppStatic /usr/local/bin/vvc_encoder
|
|
|
|
|
2021-05-15 06:09:01 +00:00
|
|
|
# Create user
|
|
|
|
RUN useradd -ms /bin/bash app_user
|
|
|
|
|
2021-05-24 06:07:47 +00:00
|
|
|
# Copy av1an
|
2021-05-15 06:09:01 +00:00
|
|
|
COPY . /Av1an
|
|
|
|
WORKDIR /Av1an
|
2021-01-18 02:13:24 +00:00
|
|
|
|
|
|
|
# Change permissions
|
2021-05-15 06:09:01 +00:00
|
|
|
RUN chmod 777 -R /Av1an
|
2021-01-31 21:20:23 +00:00
|
|
|
|
2021-05-16 01:05:18 +00:00
|
|
|
# Change user
|
2021-01-31 21:20:23 +00:00
|
|
|
USER app_user
|
2021-01-18 02:13:24 +00:00
|
|
|
|
2021-05-16 01:05:18 +00:00
|
|
|
# Install rust
|
2021-05-23 20:23:44 +00:00
|
|
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain nightly
|
2021-05-16 01:05:18 +00:00
|
|
|
|
|
|
|
# Create virtualenv required for maturin develop
|
|
|
|
ENV VIRTUAL_ENV=/Av1an/venv
|
|
|
|
RUN python3 -m venv "${VIRTUAL_ENV}"
|
|
|
|
ENV PATH="$VIRTUAL_ENV/bin:/home/app_user/.cargo/bin:$PATH"
|
|
|
|
|
|
|
|
# Install av1an requirements and build rust requirements
|
2021-05-24 06:07:47 +00:00
|
|
|
RUN pip3 install wheel && pip3 install -r requirements.txt vapoursynth
|
2021-05-23 20:23:44 +00:00
|
|
|
RUN maturin develop --release -m av1an-pyo3/Cargo.toml
|
2021-05-16 01:05:18 +00:00
|
|
|
|
2021-01-18 02:13:24 +00:00
|
|
|
VOLUME ["/videos"]
|
|
|
|
WORKDIR /videos
|
|
|
|
|
2021-05-15 06:09:01 +00:00
|
|
|
ENTRYPOINT [ "/Av1an/av1an.py" ]
|