clove1002 commited on
Commit
1e587fa
·
verified ·
1 Parent(s): 631ec46

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -17
Dockerfile CHANGED
@@ -1,9 +1,6 @@
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
  # Install system dependencies
9
  RUN apt-get update && \
@@ -13,25 +10,16 @@ RUN apt-get update && \
13
  apt-get clean && \
14
  rm -rf /var/lib/apt/lists/*
15
 
16
- # Set working directory
17
- WORKDIR /app
18
-
19
- # Copy dependency files
20
  COPY requirements.txt .
21
- COPY postBuild .
22
- RUN chmod +x postBuild
23
-
24
- # Install Python dependencies
25
  RUN pip install --upgrade pip && pip install -r requirements.txt
26
 
27
- # Install Playwright and browser binaries
28
- RUN ./postBuild
29
 
30
- # Copy app files
31
  COPY . .
32
 
33
- # Expose port for FastAPI
34
  EXPOSE 7860
35
 
36
- # Run the app
37
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ WORKDIR /app
 
 
4
 
5
  # Install system dependencies
6
  RUN apt-get update && \
 
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
+ # Copy files and install Python deps
 
 
 
14
  COPY requirements.txt .
 
 
 
 
15
  RUN pip install --upgrade pip && pip install -r requirements.txt
16
 
17
+ # Install Playwright and Chromium
18
+ RUN playwright install --with-deps
19
 
20
+ # Copy your FastAPI app files
21
  COPY . .
22
 
 
23
  EXPOSE 7860
24
 
 
25
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]