Use hardware acceleration when converting videos. (#1056)

This commit is contained in:
Googol Lee
2024-10-11 22:27:56 +02:00
committed by GitHub
parent dd90d476ad
commit 4303b71311
15 changed files with 375 additions and 90 deletions

View File

@@ -56,7 +56,17 @@ COPY scripts/set_compiler_env.sh /app/scripts/
RUN chmod +x /app/scripts/*.sh \
&& source /app/scripts/set_compiler_env.sh
COPY scripts/install_*.sh /app/scripts/
# Split values in `/env`
# hadolint ignore=SC2046
RUN chmod +x /app/scripts/*.sh \
&& export $(cat /env) \
&& /app/scripts/install_build_dependencies.sh \
&& /app/scripts/install_runtime_dependencies.sh
COPY --from=viktorstrate/dependencies /artifacts.tar.gz /dependencies/
# Split values in `/env`
# hadolint ignore=SC2046
RUN export $(cat /env) \
&& cd /dependencies/ \
&& tar xfv artifacts.tar.gz \
@@ -67,13 +77,9 @@ RUN export $(cat /env) \
&& ldconfig \
&& apt-get install -y ./deb/jellyfin-ffmpeg.deb
COPY scripts/install_*.sh /app/scripts/
RUN chmod +x /app/scripts/*.sh \
&& export $(cat /env) \
&& /app/scripts/install_build_dependencies.sh \
&& /app/scripts/install_runtime_dependencies.sh
COPY api/go.mod api/go.sum /app/api/
# Split values in `/env`
# hadolint ignore=SC2046
RUN export $(cat /env) \
&& go env \
&& go mod download \
@@ -85,6 +91,8 @@ RUN export $(cat /env) \
github.com/Kagami/go-face
COPY api /app/api
# Split values in `/env`
# hadolint ignore=SC2046
RUN export $(cat /env) \
&& go env \
&& go build -v -o photoview .