Hana Celeste commited on
Commit
858d981
·
verified ·
1 Parent(s): 3f1fc1b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -1,18 +1,15 @@
1
- # Sử dụng môi trường có sẵn Playwright và Python
2
  FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy
3
 
4
- # Thiết lập thư mục làm việc
5
  WORKDIR /app
6
 
7
- # Copy file yêu cầu và cài đặt
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Cài đặt trình duyệt Chromium
12
  RUN playwright install chromium
13
 
14
- # Copy toàn bộ code
15
  COPY . .
16
 
17
- # Hugging Face yêu cầu chạy trên cổng 7860
18
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
  FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  RUN playwright install chromium
9
 
 
10
  COPY . .
11
 
12
+ ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
13
+ ENV PYTHONUNBUFFERED=1
14
+
15
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]