AiDeveloper1 commited on
Commit
4d7f843
·
verified ·
1 Parent(s): 1d5394c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -47
Dockerfile CHANGED
@@ -1,47 +1,48 @@
1
- # Use official Python image
2
- FROM python:3.10-slim
3
-
4
- # Set environment variables
5
- ENV PYTHONDONTWRITEBYTECODE=1
6
- ENV PYTHONUNBUFFERED=1
7
-
8
- # Set working directory
9
- WORKDIR /app
10
-
11
- # Install system dependencies for Playwright
12
- RUN apt-get update && apt-get install -y \
13
- wget \
14
- curl \
15
- gnupg \
16
- ca-certificates \
17
- fonts-liberation \
18
- libasound2 \
19
- libatk-bridge2.0-0 \
20
- libatk1.0-0 \
21
- libcups2 \
22
- libdbus-1-3 \
23
- libgdk-pixbuf2.0-0 \
24
- libnspr4 \
25
- libnss3 \
26
- libx11-xcb1 \
27
- libxcomposite1 \
28
- libxdamage1 \
29
- libxrandr2 \
30
- xdg-utils \
31
- && rm -rf /var/lib/apt/lists/*
32
-
33
- # Copy requirements and install Python dependencies
34
- COPY requirements.txt .
35
- RUN pip install --upgrade pip && pip install -r requirements.txt
36
-
37
- # Install Playwright browsers
38
- RUN playwright install --with-deps
39
-
40
- # Copy application files
41
- COPY . .
42
-
43
- # Expose port (Hugging Face uses port 7860 or 8000 typically)
44
- EXPOSE 7860
45
-
46
- # Command to run the app
47
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ # Use official Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies for Playwright
12
+ RUN apt-get update && apt-get install -y \
13
+ wget \
14
+ curl \
15
+ gnupg \
16
+ ca-certificates \
17
+ fonts-liberation \
18
+ libasound2 \
19
+ libatk-bridge2.0-0 \
20
+ libatk1.0-0 \
21
+ libcups2 \
22
+ libdbus-1-3 \
23
+ libgdk-pixbuf2.0-0 \
24
+ libnspr4 \
25
+ libnss3 \
26
+ libx11-xcb1 \
27
+ libxcomposite1 \
28
+ libxdamage1 \
29
+ libxrandr2 \
30
+ xdg-utils \
31
+ && rm -rf /var/lib/apt/lists/*
32
+
33
+ # Copy requirements and install Python dependencies
34
+ COPY requirements.txt .
35
+ RUN pip install --upgrade pip && pip install -r requirements.txt
36
+
37
+ # Install Playwright browsers
38
+ RUN playwright install --with-deps
39
+ RUN playwright install chorium --with-deps
40
+
41
+ # Copy application files
42
+ COPY . .
43
+
44
+ # Expose port (Hugging Face uses port 7860 or 8000 typically)
45
+ EXPOSE 7860
46
+
47
+ # Command to run the app
48
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]