Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
whisper-asr-webservice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Schwertgen
whisper-asr-webservice
Commits
8c390ec4
Commit
8c390ec4
authored
4 months ago
by
Ahmet Öner
Browse files
Options
Downloads
Patches
Plain Diff
Simplify FFmpeg installation using pre-built image
parent
0cd35b89
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+2
-43
2 additions, 43 deletions
Dockerfile
Dockerfile.gpu
+2
-41
2 additions, 41 deletions
Dockerfile.gpu
with
4 additions
and
84 deletions
Dockerfile
+
2
−
43
View file @
8c390ec4
FROM
debian:bookworm-slim
AS
ffmpeg
RUN
export
DEBIAN_FRONTEND
=
noninteractive
\
&&
apt-get
-qq
update
\
&&
apt-get
-qq
install
--no-install-recommends
\
build-essential
\
git
\
pkg-config
\
yasm
\
ca-certificates
\
gcc
\
python3-dev
\
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
git clone https://github.com/FFmpeg/FFmpeg.git
--depth
1
--branch
n6.1.1
--single-branch
/FFmpeg-6.1.1
WORKDIR
/FFmpeg-6.1.1
RUN
PATH
=
"
$HOME
/bin:
$PATH
"
PKG_CONFIG_PATH
=
"
$HOME
/ffmpeg_build/lib/pkgconfig"
./configure
\
--prefix
=
"
$HOME
/ffmpeg_build"
\
--pkg-config-flags
=
"--static"
\
--extra-cflags
=
"-I
$HOME
/ffmpeg_build/include"
\
--extra-ldflags
=
"-L
$HOME
/ffmpeg_build/lib"
\
--extra-libs
=
"-lpthread -lm"
\
--ld
=
"g++"
\
--bindir
=
"
$HOME
/bin"
\
--disable-doc
\
--disable-htmlpages
\
--disable-podpages
\
--disable-txtpages
\
--disable-network
\
--disable-autodetect
\
--disable-hwaccels
\
--disable-ffprobe
\
--disable-ffplay
\
--enable-filter
=
copy
\
--enable-protocol
=
file
\
--enable-small
&&
\
PATH
=
"
$HOME
/bin:
$PATH
"
make
-j
$(
nproc
)
&&
\
make
install
&&
\
hash
-r
FROM
onerahmet/ffmpeg:n7.1
AS
ffmpeg
FROM
swaggerapi/swagger-ui:v5.9.1
AS
swagger-ui
...
...
@@ -61,8 +21,7 @@ ENV PATH="${PATH}:${POETRY_VENV}/bin"
WORKDIR
/app
COPY
. /app
COPY
--from=ffmpeg /FFmpeg-6.1.1 /FFmpeg-6.1.1
COPY
--from=ffmpeg /root/bin/ffmpeg /usr/local/bin/ffmpeg
COPY
--from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
COPY
--from=swagger-ui /usr/share/nginx/html/swagger-ui.css swagger-ui-assets/swagger-ui.css
COPY
--from=swagger-ui /usr/share/nginx/html/swagger-ui-bundle.js swagger-ui-assets/swagger-ui-bundle.js
...
...
This diff is collapsed.
Click to expand it.
Dockerfile.gpu
+
2
−
41
View file @
8c390ec4
FROM debian:bookworm-slim AS ffmpeg
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qq update \
&& apt-get -qq install --no-install-recommends \
build-essential \
git \
pkg-config \
yasm \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/FFmpeg/FFmpeg.git --depth 1 --branch n6.1.1 --single-branch /FFmpeg-6.1.1
WORKDIR /FFmpeg-6.1.1
RUN PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="$HOME/bin" \
--disable-doc \
--disable-htmlpages \
--disable-podpages \
--disable-txtpages \
--disable-network \
--disable-autodetect \
--disable-hwaccels \
--disable-ffprobe \
--disable-ffplay \
--enable-filter=copy \
--enable-protocol=file \
--enable-small && \
PATH="$HOME/bin:$PATH" make -j$(nproc) && \
make install && \
hash -r
FROM onerahmet/ffmpeg:n7.1 AS ffmpeg
FROM swaggerapi/swagger-ui:v5.9.1 AS swagger-ui
...
...
@@ -78,8 +40,7 @@ RUN poetry config virtualenvs.in-project true
RUN poetry install --no-root
COPY . .
COPY --from=ffmpeg /FFmpeg-6.1.1 /FFmpeg-6.1.1
COPY --from=ffmpeg /root/bin/ffmpeg /usr/local/bin/ffmpeg
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
COPY --from=swagger-ui /usr/share/nginx/html/swagger-ui.css swagger-ui-assets/swagger-ui.css
COPY --from=swagger-ui /usr/share/nginx/html/swagger-ui-bundle.js swagger-ui-assets/swagger-ui-bundle.js
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment