clove1002 commited on
Commit
3a4db54
·
verified ·
1 Parent(s): 0e73ca4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -24
Dockerfile CHANGED
@@ -1,28 +1,14 @@
1
  FROM python:3.10-slim
2
 
3
- # Create a working directory
4
  WORKDIR /app
5
 
6
- # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
- curl \
9
- wget \
10
- gnupg \
11
- unzip \
12
- fonts-liberation \
13
- libnss3 \
14
- libatk1.0-0 \
15
- libatk-bridge2.0-0 \
16
- libcups2 \
17
- libxcomposite1 \
18
- libxdamage1 \
19
- libxrandr2 \
20
- libgbm1 \
21
- libasound2 \
22
- libpangocairo-1.0-0 \
23
- libxshmfence1 \
24
- libxss1 \
25
- libgtk-3-0 \
26
  && rm -rf /var/lib/apt/lists/*
27
 
28
  # Install Python dependencies
@@ -32,11 +18,11 @@ RUN pip install --no-cache-dir -r requirements.txt
32
  # Install Playwright browsers
33
  RUN playwright install --with-deps
34
 
35
- # Copy app code
36
- COPY app/ app/
37
 
38
- # Expose port
39
  EXPOSE 7860
40
 
41
- # Start server
42
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Set working directory
4
  WORKDIR /app
5
 
6
+ # Install system dependencies for Playwright
7
  RUN apt-get update && apt-get install -y \
8
+ curl wget gnupg unzip \
9
+ fonts-liberation libnss3 libatk1.0-0 libatk-bridge2.0-0 \
10
+ libcups2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
11
+ libasound2 libpangocairo-1.0-0 libxshmfence1 libxss1 libgtk-3-0 \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Install Python dependencies
 
18
  # Install Playwright browsers
19
  RUN playwright install --with-deps
20
 
21
+ # Copy application code
22
+ COPY app/ /app/app/
23
 
24
+ # Expose port for FastAPI
25
  EXPOSE 7860
26
 
27
+ # Start the FastAPI server
28
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]