minhpng commited on
Commit
4c2f6f7
·
1 Parent(s): d5b2d00

REMOVE model to package

Browse files
Files changed (3) hide show
  1. .dockerignore +8 -1
  2. .gitignore +9 -1
  3. Dockerfile +11 -2
.dockerignore CHANGED
@@ -1,2 +1,9 @@
1
  .venv
2
- cached
 
 
 
 
 
 
 
 
1
  .venv
2
+ cached/audio
3
+ cached/hub/models--Systran--faster-distil-whisper-large-v2
4
+ cached/hub/models--Systran--faster-distil-whisper-large-v3
5
+ cached/hub/models--Systran--faster-distil-whisper-medium.en
6
+
7
+ cached/hub/.locks/models--Systran--faster-distil-whisper-large-v2
8
+ cached/hub/.locks/models--Systran--faster-distil-whisper-large-v3
9
+ cached/hub/.locks/models--Systran--faster-distil-whisper-medium.en
.gitignore CHANGED
@@ -161,4 +161,12 @@ cython_debug/
161
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
  #.idea/
163
 
164
- cached
 
 
 
 
 
 
 
 
 
161
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
  #.idea/
163
 
164
+ cached
165
+ # cached/audio
166
+ # cached/hub/models--Systran--faster-distil-whisper-large-v2
167
+ # cached/hub/models--Systran--faster-distil-whisper-large-v3
168
+ # cached/hub/models--Systran--faster-distil-whisper-medium.en
169
+
170
+ # cached/hub/.locks/models--Systran--faster-distil-whisper-large-v2
171
+ # cached/hub/.locks/models--Systran--faster-distil-whisper-large-v3
172
+ # cached/hub/.locks/models--Systran--faster-distil-whisper-medium.en
Dockerfile CHANGED
@@ -1,10 +1,15 @@
1
-
 
 
 
 
 
2
 
3
 
4
  # Use the official Python 3.10.9 image
5
  FROM python:3.12.1
6
 
7
- RUN apt-get update -qq && apt-get install ffmpeg -y
8
  WORKDIR /app
9
 
10
  # Copy the current directory contents into the container at .
@@ -21,6 +26,10 @@ ENV HOME=/home/user \
21
 
22
  WORKDIR $HOME/app
23
 
 
 
 
 
24
  COPY --chown=user . $HOME/app
25
 
26
  EXPOSE 7860
 
1
+ FROM python:3.9 AS model
2
+ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
3
+ RUN yum install git-lfs -y
4
+ RUN git lfs install
5
+ RUN git clone https://huggingface.co/Systran/faster-whisper-small /tmp/model
6
+ RUN rm -rf /tmp/model/.git
7
 
8
 
9
  # Use the official Python 3.10.9 image
10
  FROM python:3.12.1
11
 
12
+ # RUN apt-get update -qq && apt-get install ffmpeg -y
13
  WORKDIR /app
14
 
15
  # Copy the current directory contents into the container at .
 
26
 
27
  WORKDIR $HOME/app
28
 
29
+ RUN mkdir -p $HOME/app/cached/hub/models--Systran--faster-whisper-small
30
+
31
+ COPY --from=model /tmp/model $HOME/app/cached/hub/models--Systran--faster-whisper-small
32
+
33
  COPY --chown=user . $HOME/app
34
 
35
  EXPOSE 7860