Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +37 -2
Dockerfile
CHANGED
@@ -1,2 +1,37 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
+
|
3 |
+
# Set environment variables
|
4 |
+
ENV PIP_NO_CACHE_DIR=true \
|
5 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
6 |
+
PYTHONUNBUFFERED=1 \
|
7 |
+
NUMBA_DISABLE_CACHE=1
|
8 |
+
|
9 |
+
# Install system dependencies
|
10 |
+
RUN apt-get update && apt-get install -y \
|
11 |
+
git ffmpeg libsndfile1 build-essential python3-dev libffi-dev wget curl \
|
12 |
+
&& apt-get clean
|
13 |
+
|
14 |
+
# Set workdir
|
15 |
+
WORKDIR /app
|
16 |
+
|
17 |
+
# Copy project files
|
18 |
+
COPY app.py app.py
|
19 |
+
COPY requirements.txt requirements.txt
|
20 |
+
|
21 |
+
# Install Python build tools first
|
22 |
+
RUN pip install --upgrade pip setuptools wheel
|
23 |
+
|
24 |
+
# Fix numpy for numba compatibility
|
25 |
+
RUN pip install numpy==1.24.3
|
26 |
+
|
27 |
+
# Install whisper manually from GitHub
|
28 |
+
RUN pip install git+https://github.com/openai/whisper.git
|
29 |
+
|
30 |
+
# Install all other requirements except TTS
|
31 |
+
RUN pip install -r requirements.txt
|
32 |
+
|
33 |
+
# Install Coqui TTS separately (after dependencies)
|
34 |
+
RUN pip install git+https://github.com/coqui-ai/TTS.git
|
35 |
+
|
36 |
+
# Run the Streamlit app
|
37 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|