This commit is contained in:
Jesse Bannon 2023-03-15 13:52:00 -07:00
parent d5d8ee1025
commit de9d362bf4

View file

@ -7,17 +7,19 @@ ARG DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES=all ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
# Needed for phantomjs
ENV OPENSSL_CONF=/etc/ssl
############################################################################### ###############################################################################
# YTDL-SUB INSTALL # YTDL-SUB INSTALL
SHELL ["/bin/bash", "-c"]
COPY root/ / COPY root/ /
RUN mkdir -p /config && \ RUN mkdir -p /config && \
apt-get -y update && \ apt-get -y update && \
apt-get -y upgrade && \ apt-get -y upgrade && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
software-properties-common && \ software-properties-common && \
add-apt-repository ppa:savoury1/ffmpeg4 && \
add-apt-repository ppa:savoury1/ffmpeg5 && \
apt-get -y update && \ apt-get -y update && \
apt-get -y upgrade && \ apt-get -y upgrade && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
@ -28,28 +30,48 @@ RUN mkdir -p /config && \
python3.10-dev \ python3.10-dev \
python3-pip \ python3-pip \
fontconfig \ fontconfig \
python3-venv \ xz-utils \
# Ensure ffmpeg is properly installed bzip2 \
ffmpeg && \ python3-venv && \
ffmpeg -version && \ if [[ $(uname -m) == "x86_64" ]]; then \
curl -L -o ffmpeg.tar.gz https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz && \
tar -xf ffmpeg.tar.gz && \
chmod +x ffmpeg-master-latest-linux64-gpl/bin/ffmpeg && \
chmod +x ffmpeg-master-latest-linux64-gpl/bin/ffprobe && \
mv ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/bin/ffmpeg && \
mv ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/bin/ffprobe && \
rm ffmpeg.tar.gz && \
rm -rf ffmpeg-master-latest-linux64-gpl/ ; \
else \
curl -L -o ffmpeg.tar.gz https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linuxarm64-gpl.tar.xz && \
tar -xf ffmpeg.tar.gz && \
chmod +x ffmpeg-master-latest-linuxarm64-gpl/bin/ffmpeg && \
chmod +x ffmpeg-master-latest-linuxarm64-gpl/bin/ffprobe && \
mv ffmpeg-master-latest-linuxarm64-gpl/bin/ffmpeg /usr/bin/ffmpeg && \
mv ffmpeg-master-latest-linuxarm64-gpl/bin/ffprobe /usr/bin/ffprobe && \
rm ffmpeg.tar.gz && \
rm -rf ffmpeg-master-latest-linuxarm64-gpl/ ; \
fi && \
# Ensure ffmpeg is installed
ffmpeg -version && \
# Install phantomjs if using x86_64, ensure it is properly installed # Install phantomjs if using x86_64, ensure it is properly installed
if [[ $(uname -m) == "x86_64" ]]; then \ if [[ $(uname -m) == "x86_64" ]]; then \
cd /usr/share && \ curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xj && \
curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar xj && \ mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && \
ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs && \ rm -rf phantomjs-2.1.1-linux-x86_64/ && \
echo "Phantom JS version:" && \ echo "Phantom JS version:" && \
phantomjs --version && \ phantomjs --version ; \
cd -; \
fi && \ fi && \
# Install ytdl-sub, ensure it is installed properly # Install ytdl-sub, ensure it is installed properly
pip install --no-cache-dir ytdl_sub-*.whl && \ pip install --no-cache-dir ytdl_sub-*.whl && \
ytdl-sub -h && \ ytdl-sub -h && \
ldconfig && \
# Delete unneeded packages after install # Delete unneeded packages after install
rm ytdl_sub-*.whl && \ rm ytdl_sub-*.whl && \
apt-get remove -y \ apt-get remove -y \
g++ \ g++ \
make \ make \
xz-utils \
bzip2 \
python3.10-dev \ python3.10-dev \
python3-venv && \ python3-venv && \
apt-get autoremove -y && \ apt-get autoremove -y && \