Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
+
|
| 3 |
+
# Install FFmpeg (Required for Video Downloading and Audio Processing)
|
| 4 |
+
RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
|
| 5 |
+
|
| 6 |
+
WORKDIR /app
|
| 7 |
+
ENV XDG_CACHE_HOME=/tmp
|
| 8 |
+
|
| 9 |
+
# Install Python packages
|
| 10 |
+
COPY requirements.txt .
|
| 11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Pre-download the Whisper AI Voice model during build so it's instantly ready
|
| 14 |
+
RUN python -c "import whisper; whisper.load_model('base')"
|
| 15 |
+
|
| 16 |
+
# Copy the app code and start the API
|
| 17 |
+
COPY app.py .
|
| 18 |
+
EXPOSE 7860
|
| 19 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|