Files
AILab/bbit_ai/Dockerfile_bot_server
T
2025-11-05 18:08:28 +08:00

25 lines
771 B
Plaintext

FROM python:3.10-slim
WORKDIR /app
# 安装系统依赖
RUN apt-get update && \
apt-get install -y --no-install-recommends libopus0 ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# 配置pip使用清华镜像源,并设置超时和重试
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn && \
pip config set global.timeout 120 && \
pip config set install.retries 5
# 复制requirements.txt
COPY app_bot/requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt --default-timeout=120 --retries 5
COPY app_bot/ .
CMD ["python", "app.py"]