DataHoarder
883dad8b84
All checks were successful
continuous-integration/drone/push Build is passing
73 lines
3 KiB
Docker
73 lines
3 KiB
Docker
FROM golang:1.21-bookworm AS builder
|
|
|
|
ENV CFLAGS="-march=native -Ofast"
|
|
ENV CXXFLAGS="-march=native -Ofast"
|
|
ENV CGO_CFLAGS="-march=native -Ofast"
|
|
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
|
|
git gcc g++ musl-dev bash nasm autoconf automake cmake make libtool gettext pkg-config meson ccache perl xxd xz-utils && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig
|
|
|
|
ARG X264_TAG="stable"
|
|
RUN git clone --depth 1 --branch "${X264_TAG}" https://code.videolan.org/videolan/x264.git /tmp/x264 && cd /tmp/x264 && \
|
|
./configure --disable-cli --disable-ffms --disable-lavf --disable-swscale --enable-shared --bit-depth=all --chroma-format=all --enable-lto --enable-pic --disable-opencl --prefix=/usr && \
|
|
make -j$(nproc) && \
|
|
make install && \
|
|
cd / && \
|
|
rm -rf /tmp/x264
|
|
|
|
ARG VMAF_TAG="v2.3.1"
|
|
RUN git clone --depth 1 --branch "${VMAF_TAG}" https://github.com/Netflix/vmaf.git /tmp/vmaf && cd /tmp/vmaf/libvmaf && \
|
|
meson setup build . --prefix /usr --libdir=lib --buildtype release --default-library=static \
|
|
-Denable_float=true -Dbuilt_in_models=true -Denable_tests=false -Denable_docs=false && \
|
|
ninja -vC build && \
|
|
ninja -vC build install && \
|
|
cp -rvf /tmp/vmaf/model /usr/share/model && \
|
|
cd / && \
|
|
rm -rf /tmp/vmaf
|
|
|
|
ARG DAV1D_TAG="1.3.0"
|
|
RUN git clone --depth 1 --branch "${DAV1D_TAG}" https://code.videolan.org/videolan/dav1d.git /tmp/dav1d && cd /tmp/dav1d && \
|
|
meson setup build . --prefix /usr --libdir=lib --buildtype release --default-library=shared && \
|
|
ninja -vC build && \
|
|
ninja -vC build install && \
|
|
cd / && \
|
|
rm -rf /tmp/dav1d
|
|
|
|
ARG AOM_TAG="v3.7.0"
|
|
RUN git clone --depth 1 --branch "${AOM_TAG}" https://aomedia.googlesource.com/aom.git /tmp/aom && cd /tmp/aom && \
|
|
mkdir b && cd b && \
|
|
cmake .. -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -D CMAKE_INSTALL_PREFIX:PATH=/usr \
|
|
-DENABLE_DOCS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_TOOLS=OFF -DENABLE_TESTS=OFF -DENABLE_CCACHE=ON \
|
|
-DCONFIG_TUNE_VMAF=1 -DCONFIG_THREE_PASS=0 -DCONFIG_AV1_ENCODER=1 -DCONFIG_AV1_DECODER=1 && \
|
|
make -j$(nproc) && \
|
|
make install && \
|
|
cd / && \
|
|
rm -rf /tmp/aom
|
|
|
|
WORKDIR /usr/src/Ignite
|
|
|
|
ARG GOPROXY=""
|
|
ENV GOPROXY=${GOPROXY}
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download -x && go mod verify
|
|
|
|
COPY . .
|
|
|
|
RUN go build -v \
|
|
-o /usr/bin/ git.gammaspectra.live/S.O.N.G/Ignite/cli/encode-libaom git.gammaspectra.live/S.O.N.G/Ignite/cli/encode-server
|
|
RUN CGO_ENABLED=0 go build -v \
|
|
-o /usr/bin/encode-pool git.gammaspectra.live/S.O.N.G/Ignite/cli/encode-pool
|
|
|
|
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz /tmp/ffmpeg-release.tar.xz
|
|
RUN tar -xJf /tmp/ffmpeg-release.tar.xz -C /tmp && mv /tmp/ffmpeg-*-amd64-static/ffmpeg /usr/bin/ffmpeg && rm -rf /tmp/ffmpeg-*
|
|
|
|
ENV VMAF_MODEL_PATH="/usr/share/model/vmaf_v0.6.1.json"
|
|
ENV FFMPEG_PATH="/usr/bin/ffmpeg"
|
|
|
|
WORKDIR / |