use linuxarm64 ffmpeg builds for arm64
This commit is contained in:
parent
725f17bcd2
commit
f8dccfcd15
25
Dockerfile
25
Dockerfile
|
@ -6,8 +6,8 @@
|
||||||
FROM python:3.10.8-slim-bullseye AS builder
|
FROM python:3.10.8-slim-bullseye AS builder
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
RUN apt-get install -y --no-install-recommends build-essential gcc libldap2-dev libsasl2-dev libssl-dev
|
build-essential gcc libldap2-dev libsasl2-dev libssl-dev
|
||||||
|
|
||||||
# install requirements
|
# install requirements
|
||||||
COPY ./tubearchivist/requirements.txt /requirements.txt
|
COPY ./tubearchivist/requirements.txt /requirements.txt
|
||||||
|
@ -32,19 +32,22 @@ RUN apt-get clean && apt-get -y update && apt-get -y install --no-install-recomm
|
||||||
curl \
|
curl \
|
||||||
xz-utils && rm -rf /var/lib/apt/lists/*
|
xz-utils && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# get newest patched ffmpeg and ffprobe builds for amd64 fall back to repo ffmpeg for arm64
|
# install patched ffmpeg build, default to linux64
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
|
||||||
|
curl -s https://api.github.com/repos/yt-dlp/FFmpeg-Builds/releases/latest \
|
||||||
|
| grep browser_download_url \
|
||||||
|
| grep ".*master.*linuxarm64.*tar.xz" \
|
||||||
|
| cut -d '"' -f 4 \
|
||||||
|
| xargs curl -L --output ffmpeg.tar.xz ; \
|
||||||
|
else \
|
||||||
curl -s https://api.github.com/repos/yt-dlp/FFmpeg-Builds/releases/latest \
|
curl -s https://api.github.com/repos/yt-dlp/FFmpeg-Builds/releases/latest \
|
||||||
| grep browser_download_url \
|
| grep browser_download_url \
|
||||||
| grep ".*master.*linux64.*tar.xz" \
|
| grep ".*master.*linux64.*tar.xz" \
|
||||||
| cut -d '"' -f 4 \
|
| cut -d '"' -f 4 \
|
||||||
| xargs curl -L --output ffmpeg.tar.xz && \
|
| xargs curl -L --output ffmpeg.tar.xz ; \
|
||||||
tar -xf ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffmpeg" && \
|
fi && \
|
||||||
tar -xf ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffprobe" && \
|
tar -xf ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffmpeg" && \
|
||||||
rm ffmpeg.tar.xz \
|
tar -xf ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffprobe"
|
||||||
; elif [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
|
|
||||||
apt-get -y update && apt-get -y install --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/* \
|
|
||||||
; fi
|
|
||||||
|
|
||||||
# install debug tools for testing environment
|
# install debug tools for testing environment
|
||||||
RUN if [ "$INSTALL_DEBUG" ] ; then \
|
RUN if [ "$INSTALL_DEBUG" ] ; then \
|
||||||
|
|
Loading…
Reference in New Issue