Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
whisper-webvtt-transcriber
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jan Hartig
whisper-webvtt-transcriber
Commits
033eb23f
Commit
033eb23f
authored
2 years ago
by
Jan Hartig
Browse files
Options
Downloads
Patches
Plain Diff
Use Multi-Stage build for better build caching
parent
b12418be
Branches
Branches containing commit
Tags
v0.12.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+16
-7
16 additions, 7 deletions
Dockerfile
with
16 additions
and
7 deletions
Dockerfile
+
16
−
7
View file @
033eb23f
FROM
ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2
FROM
ghcr.io/opennmt/ctranslate2:latest-ubuntu20.04-cuda11.2
as
base
#
install
faster-whisper
RUN
python3
-m
pip
--no-cache-dir
install
faster-whisper
tqdm
# faster-whisper
is always needed, install in base
RUN
python3
-m
pip
--no-cache-dir
install
faster-whisper
# create huggingface home
RUN
mkdir
/hf
ENV
HF_HOME=/hf
# preload model
RUN
python3
-c
"import faster_whisper; faster_whisper.download_model('large-v2')"
# Download model in new container to for better build caching
FROM
base
as
downloader
# download model and set permissions
RUN
python3
-c
"import faster_whisper; faster_whisper.download_model('large-v2')"
&&
chmod
-R
755 /hf
# fix permissions
RUN
chmod
-R
755 /hf
# Actual container starts here
FROM
base
# Copy model
COPY
--from=downloader /hf /hf
# install dependencies
RUN
python3
-m
pip
--no-cache-dir
install
tqdm
COPY
main.py .
...
...
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