Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +25 -29
Dockerfile
CHANGED
|
@@ -1,29 +1,25 @@
|
|
| 1 |
-
# ---- BubbleGuard (FastAPI) – Dockerfile for Hugging Face Spaces ----
|
| 2 |
-
FROM python:3.10-slim
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
ENV HOST=0.0.0.0
|
| 27 |
-
|
| 28 |
-
# Start the app (main.py loads assets from Google Drive, then runs uvicorn)
|
| 29 |
-
CMD ["python", "main.py"]
|
|
|
|
| 1 |
+
# ---- BubbleGuard (FastAPI) – Dockerfile for Hugging Face Spaces ----
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
| 5 |
+
PIP_NO_CACHE_DIR=1 \
|
| 6 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
| 7 |
+
PYTHONUNBUFFERED=1
|
| 8 |
+
|
| 9 |
+
# ffmpeg is required for faster-whisper (audio)
|
| 10 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
+
|
| 14 |
+
WORKDIR /app
|
| 15 |
+
|
| 16 |
+
# Install Python deps first (better caching)
|
| 17 |
+
COPY requirements.txt .
|
| 18 |
+
RUN python -m pip install --upgrade pip && pip install -r requirements.txt
|
| 19 |
+
|
| 20 |
+
# App code + UI at repo root
|
| 21 |
+
COPY . .
|
| 22 |
+
|
| 23 |
+
# Hugging Face injects $PORT; bind to 0.0.0.0
|
| 24 |
+
ENV HOST=0.0.0.0
|
| 25 |
+
CMD ["python", "main.py"]
|
|
|
|
|
|
|
|
|
|
|
|