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
fd70f787
Commit
fd70f787
authored
Feb 15, 2024
by
Ahmet Öner
Browse files
Options
Downloads
Patches
Plain Diff
Add FFmpeg compiling Docker stage
parent
be0beb0a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+42
-5
42 additions, 5 deletions
Dockerfile
Dockerfile.gpu
+43
-1
43 additions, 1 deletion
Dockerfile.gpu
with
85 additions
and
6 deletions
Dockerfile
+
42
−
5
View file @
fd70f787
FROM
swaggerapi/swagger-ui:v5.9.1
AS
swagger-ui
FROM
debian:bookworm-slim
AS
ffmpeg
FROM
python:3.10-slim
ENV
POETRY_VENV=/app/.venv
RUN
export
DEBIAN_FRONTEND
=
noninteractive
\
RUN
export
DEBIAN_FRONTEND
=
noninteractive
\
&&
apt-get
-qq
update
\
&&
apt-get
-qq
update
\
&&
apt-get
-qq
install
--no-install-recommends
\
&&
apt-get
-qq
install
--no-install-recommends
\
ffmpeg
\
build-essential
\
git
\
pkg-config
\
yasm
\
ca-certificates
\
&&
rm
-rf
/var/lib/apt/lists/
*
&&
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
swaggerapi/swagger-ui:v5.9.1
AS
swagger-ui
FROM
python:3.10-bookworm
ENV
POETRY_VENV=/app/.venv
RUN
python3
-m
venv
$POETRY_VENV
\
RUN
python3
-m
venv
$POETRY_VENV
\
&&
$POETRY_VENV
/bin/pip
install
-U
pip setuptools
\
&&
$POETRY_VENV
/bin/pip
install
-U
pip setuptools
\
&&
$POETRY_VENV
/bin/pip
install
poetry
==
1.6.1
&&
$POETRY_VENV
/bin/pip
install
poetry
==
1.6.1
...
@@ -18,6 +53,8 @@ ENV PATH="${PATH}:${POETRY_VENV}/bin"
...
@@ -18,6 +53,8 @@ ENV PATH="${PATH}:${POETRY_VENV}/bin"
WORKDIR
/app
WORKDIR
/app
COPY
. /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=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.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
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
+
43
−
1
View file @
fd70f787
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 swaggerapi/swagger-ui:v5.9.1 AS swagger-ui
FROM swaggerapi/swagger-ui:v5.9.1 AS swagger-ui
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
ENV PYTHON_VERSION=3.10
ENV PYTHON_VERSION=3.10
...
@@ -10,7 +51,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \
...
@@ -10,7 +51,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \
python${PYTHON_VERSION} \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \
python${PYTHON_VERSION}-venv \
python3-pip \
python3-pip \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
...
@@ -31,6 +71,8 @@ RUN poetry config virtualenvs.in-project true
...
@@ -31,6 +71,8 @@ RUN poetry config virtualenvs.in-project true
RUN poetry install --no-root
RUN poetry install --no-root
COPY . .
COPY . .
COPY --from=ffmpeg /FFmpeg-6.1.1 /FFmpeg-6.1.1
COPY --from=ffmpeg /root/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.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
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