Hana Celeste commited on
Commit
58cb320
·
verified ·
1 Parent(s): d60eb01

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]