astrbot_help / Dockerfile
qa1145's picture
Upload 28 files
d347708 verified
raw
history blame contribute delete
631 Bytes
# Read Agent 容器镜像
FROM python:3.11-slim
# 设置工作目录
WORKDIR /app
# 设置环境变量
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# 安装系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 创建代码目录
RUN mkdir -p /app/code
# 暴露端口
EXPOSE 7860
# 启动命令 - 使用 Flask 内置服务器
CMD ["python", "app.py"]