File size: 474 Bytes
05cca21
 
 
 
3ba55fe
3a4dd4e
3ba55fe
3a4dd4e
 
 
3ba55fe
 
 
 
3a4dd4e
05cca21
 
 
8c00a07
05cca21
 
 
 
 
 
3ba55fe
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
26
27
FROM python:3.10-slim

WORKDIR /app

# 安装基本依赖
RUN apt-get update && \
    apt-get install -y curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# 创建缓存目录
RUN mkdir -p /app/cache && \
    chmod 777 /app/cache

# 安装 Python 依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制应用文件
COPY . .

# 暴露端口
EXPOSE 7860

# 启动命令
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]