File size: 418 Bytes
c38d68b
 
 
 
ab2fb3c
 
 
 
 
c38d68b
 
 
 
 
 
ab2fb3c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.10-slim

WORKDIR /app

# 安裝系統依賴
RUN apt-get update && apt-get install -y \
    gcc \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# 暴露端口
EXPOSE 7860

# 設置環境變量
ENV PORT=7860
ENV HOST=0.0.0.0

# 啟動命令 - 使用 app.py 而不是 main.py
CMD ["python", "app.py"]