Skip to content

Instantly share code, notes, and snippets.

@Sg4Dylan
Created September 20, 2024 06:45
Show Gist options
  • Save Sg4Dylan/8c925e09f0fee0d39ef54690b3fd7c85 to your computer and use it in GitHub Desktop.
Save Sg4Dylan/8c925e09f0fee0d39ef54690b3fd7c85 to your computer and use it in GitHub Desktop.
libvivtc.so for styler00dollar/VSGAN-tensorrt-docker
FROM ubuntu:24.04 as vivtc-vs-trt10.4
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR workspace
RUN apt update -y
RUN apt install autoconf libtool nasm ninja-build yasm python3.12 python3.12-venv python3.12-dev python3-pip wget git pkg-config python-is-python3 -y
RUN apt --fix-broken install
RUN pip install meson ninja cython --break-system-packages
# install g++13
RUN apt install build-essential manpages-dev software-properties-common -y
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
RUN apt update -y && apt install gcc-13 g++-13 -y
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
# zimg
# setting pkg version manually since otherwise 'Version' field value '-1': version number is empty
RUN apt-get install checkinstall -y
RUN git clone https://github.com/sekrit-twc/zimg --recursive && cd zimg && \
./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && make -j$(nproc) && make install
RUN rm -rf /usr/local/share/doc/zimg/ChangeLog /usr/local/share/doc/zimg/COPYING /usr/local/share/doc/zimg/README.md /usr/local/share/doc/zimg/example/ /usr/local/include/zimg* /usr/local/lib/pkgconfig/zimg.pc
RUN cd zimg && checkinstall -y -pkgversion=0.0 && \
apt install /workspace/zimg/zimg_0.0-1_amd64.deb -y
# vapoursynth
RUN wget https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R69.tar.gz && \
tar -zxvf R69.tar.gz && mv vapoursynth-R69 vapoursynth && cd vapoursynth && \
./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && make -j$(nproc) && make install && ldconfig
# VIVTC
RUN git clone https://github.com/vapoursynth/vivtc && cd vivtc && \
mkdir build && cd build && meson --buildtype release .. && ninja && ninja install
# Manually get libvivtc.so via `docker cp`
FROM ubuntu:22.04 as vivtc-vs-trt9.3
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR workspace
RUN apt update -y
RUN apt install autoconf libtool nasm ninja-build yasm python3.11 python3.11-venv python3.11-dev python3-pip wget git pkg-config python-is-python3 -y
RUN apt --fix-broken install
RUN pip install meson ninja cython
# install g++13
RUN apt install build-essential manpages-dev software-properties-common -y
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
RUN export http_proxy=http://192.168.1.131:63388 && export https_proxy=http://192.168.1.131:63388 && apt update -y && apt install gcc-13 g++-13 -y
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
# zimg
# setting pkg version manually since otherwise 'Version' field value '-1': version number is empty
RUN apt-get install checkinstall -y
RUN git clone https://github.com/sekrit-twc/zimg --recursive && cd zimg && \
./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && make -j$(nproc) && checkinstall -y -pkgversion=0.0 && \
apt install /workspace/zimg/zimg_0.0-1_amd64.deb -y
# vapoursynth
RUN wget https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R69.tar.gz && \
tar -zxvf R69.tar.gz && mv vapoursynth-R69 vapoursynth && cd vapoursynth && \
./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && make -j$(nproc) && make install && ldconfig
# VIVTC
RUN git clone https://github.com/vapoursynth/vivtc && cd vivtc && \
mkdir build && cd build && meson --buildtype release .. && ninja && ninja install
# Manually get libvivtc.so via `docker cp`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment