MetiMiester commited on
Commit
afeb367
·
verified ·
1 Parent(s): d33cc84

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Environment & pip behavior
5
- ENV DEBIAN_FRONTEND=noninteractive \
6
- PIP_NO_CACHE_DIR=1 \
7
- PYTHONDONTWRITEBYTECODE=1 \
8
- PYTHONUNBUFFERED=1
9
-
10
- # System deps (ffmpeg needed for faster-whisper)
11
- RUN apt-get update && apt-get install -y --no-install-recommends \
12
- ffmpeg \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Workdir
16
- WORKDIR /app
17
-
18
- # Python deps first (better layer caching)
19
- COPY requirements.txt .
20
- RUN python -m pip install --upgrade pip && pip install -r requirements.txt
21
-
22
- # App code + static
23
- COPY . .
24
-
25
- # Hugging Face injects $PORT. Host is 0.0.0.0 for container networking.
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"]