Spaces:
Running
Running
Koro33
commited on
Commit
•
1e7288a
1
Parent(s):
d1ea4cb
refactor: reduce image size
Browse files- .gitignore +5 -1
- Dockerfile +19 -7
.gitignore
CHANGED
@@ -1,6 +1,10 @@
|
|
|
|
1 |
venv/
|
2 |
ui/__pycache__/
|
3 |
outputs/
|
4 |
modules/__pycache__/
|
5 |
models/
|
6 |
-
modules/yt_tmp.wav
|
|
|
|
|
|
|
|
1 |
+
# from .gitignore
|
2 |
venv/
|
3 |
ui/__pycache__/
|
4 |
outputs/
|
5 |
modules/__pycache__/
|
6 |
models/
|
7 |
+
modules/yt_tmp.wav
|
8 |
+
|
9 |
+
.git
|
10 |
+
.github
|
Dockerfile
CHANGED
@@ -1,22 +1,34 @@
|
|
1 |
-
FROM
|
2 |
-
|
3 |
-
VOLUME [ "/Whisper-WebUI/models" ]
|
4 |
-
VOLUME [ "/Whisper-WebUI/outputs" ]
|
5 |
|
6 |
RUN apt-get update && \
|
7 |
-
apt-get install -y curl
|
8 |
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \
|
9 |
mkdir -p /Whisper-WebUI
|
10 |
|
11 |
WORKDIR /Whisper-WebUI
|
12 |
|
13 |
-
COPY . .
|
14 |
|
15 |
RUN python3 -m venv venv && \
|
16 |
. venv/bin/activate && \
|
17 |
pip install --no-cache-dir -r requirements.txt
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
ENV PATH="/Whisper-WebUI/venv/bin:$PATH"
|
20 |
-
ENV LD_LIBRARY_PATH=/Whisper-WebUI/venv/lib64/python3.
|
21 |
|
22 |
ENTRYPOINT [ "python", "app.py" ]
|
|
|
1 |
+
FROM debian:bookworm-slim AS builder
|
|
|
|
|
|
|
2 |
|
3 |
RUN apt-get update && \
|
4 |
+
apt-get install -y curl git python3 python3-pip python3-venv && \
|
5 |
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \
|
6 |
mkdir -p /Whisper-WebUI
|
7 |
|
8 |
WORKDIR /Whisper-WebUI
|
9 |
|
10 |
+
COPY requirements.txt .
|
11 |
|
12 |
RUN python3 -m venv venv && \
|
13 |
. venv/bin/activate && \
|
14 |
pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
+
|
17 |
+
FROM debian:bookworm-slim AS runtime
|
18 |
+
|
19 |
+
RUN apt-get update && \
|
20 |
+
apt-get install -y curl ffmpeg python3 && \
|
21 |
+
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
|
22 |
+
|
23 |
+
WORKDIR /Whisper-WebUI
|
24 |
+
|
25 |
+
COPY . .
|
26 |
+
COPY --from=builder /Whisper-WebUI/venv /Whisper-WebUI/venv
|
27 |
+
|
28 |
+
VOLUME [ "/Whisper-WebUI/models" ]
|
29 |
+
VOLUME [ "/Whisper-WebUI/outputs" ]
|
30 |
+
|
31 |
ENV PATH="/Whisper-WebUI/venv/bin:$PATH"
|
32 |
+
ENV LD_LIBRARY_PATH=/Whisper-WebUI/venv/lib64/python3.11/site-packages/nvidia/cublas/lib:/Whisper-WebUI/venv/lib64/python3.11/site-packages/nvidia/cudnn/lib
|
33 |
|
34 |
ENTRYPOINT [ "python", "app.py" ]
|