Tortyfishguy commited on
Commit
0cad66c
·
verified ·
1 Parent(s): ff1f411

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile CHANGED
@@ -1,10 +1,21 @@
 
1
  FROM python:3.10
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
 
 
 
 
10
  CMD ["python", "app.py"]
 
1
+ # ใช้ Python เวอร์ชัน 3.10 ที่รองรับแพ็กเกจทั้งหมด
2
  FROM python:3.10
3
 
4
+ # กำหนด working directory
5
  WORKDIR /app
6
 
7
+ # อัปเดต pip เป็นเวอร์ชันล่าสุดก่อนติดตั้ง dependencies
8
+ RUN pip install --upgrade pip
9
+
10
+ # คัดลอก requirements.txt และติดตั้ง dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # คัดลอกโค้ดทั้งหมดเข้า container
15
  COPY . .
16
 
17
+ # เปิดพอร์ต 7860 (ใช้สำหรับ FastAPI)
18
+ EXPOSE 7860
19
+
20
+ # รันแอปพลิเคชัน
21
  CMD ["python", "app.py"]