ShoaibSSM commited on
Commit
5feb7c0
·
verified ·
1 Parent(s): e1f3958

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -33
Dockerfile CHANGED
@@ -1,33 +1,34 @@
1
- FROM python:3.10-slim
2
-
3
- # --- System deps required by Playwright browsers ---
4
- RUN apt-get update && apt-get install -y \
5
- wget gnupg ca-certificates curl unzip \
6
- libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libxkbcommon0 \
7
- libgtk-3-0 libgbm1 libasound2 libxcomposite1 libxdamage1 libxrandr2 \
8
- libxfixes3 libpango-1.0-0 libcairo2 \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- # --- Install Playwright + Chromium ---
12
- RUN pip install playwright && playwright install --with-deps chromium
13
-
14
- # --- Install uv package manager ---
15
- RUN pip install uv
16
-
17
- # --- Copy app to container ---
18
- WORKDIR /app
19
-
20
- COPY . .
21
-
22
- ENV PYTHONUNBUFFERED=1
23
- ENV PYTHONIOENCODING=utf-8
24
-
25
- # --- Install project dependencies using uv ---
26
- RUN uv sync --frozen
27
-
28
- # HuggingFace Spaces exposes port 7860
29
- EXPOSE 7860
30
-
31
- # --- Run your FastAPI app ---
32
- # uvicorn must be in pyproject dependencies
33
- CMD ["uv", "run", "main.py"]
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # --- System deps required by Playwright browsers ---
4
+ RUN apt-get update && apt-get install -y \
5
+ wget gnupg ca-certificates curl unzip \
6
+ libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libxkbcommon0 \
7
+ libgtk-3-0 libgbm1 libasound2 libxcomposite1 libxdamage1 libxrandr2 \
8
+ libxfixes3 libpango-1.0-0 libcairo2 \
9
+ ffmpeg \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # --- Install Playwright + Chromium ---
13
+ RUN pip install playwright && playwright install --with-deps chromium
14
+
15
+ # --- Install uv package manager ---
16
+ RUN pip install uv
17
+
18
+ # --- Copy app to container ---
19
+ WORKDIR /app
20
+
21
+ COPY . .
22
+
23
+ ENV PYTHONUNBUFFERED=1
24
+ ENV PYTHONIOENCODING=utf-8
25
+
26
+ # --- Install project dependencies using uv ---
27
+ RUN uv sync --frozen
28
+
29
+ # HuggingFace Spaces exposes port 7860
30
+ EXPOSE 7860
31
+
32
+ # --- Run your FastAPI app ---
33
+ # uvicorn must be in pyproject dependencies
34
+ CMD ["uv", "run", "main.py"]