PhysicsCorrection/Dockerfile

67 lines
1.8 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM registry-vpc.cn-chengdu.aliyuncs.com/zhixueli-prod/python:3.12-slim
WORKDIR /app
# 设置国内镜像源
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
# 安装完整的系统依赖(包含所有 PyGObject 需要的库)
RUN apt-get update && apt-get install -y --no-install-recommends \
# 编译工具
gcc \
g++ \
make \
pkg-config \
cmake \
# D-Bus 相关
dbus \
dbus-x11 \
libdbus-1-dev \
libdbus-glib-1-dev \
# GLib 和 GObject 相关
libglib2.0-dev \
libgirepository1.0-dev \
gobject-introspection \
# Cairo 图形库
libcairo2-dev \
libcairo-gobject2 \
# GTK 相关(如果需要)
libgtk-3-dev \
# 其他常用库
libffi-dev \
libxml2-dev \
libxslt1-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# 设置 pip 国内镜像源
ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ \
PIP_TRUSTED_HOST=mirrors.aliyun.com
# 升级 pip 和构建工具
RUN pip install --no-cache-dir --upgrade pip setuptools wheel meson ninja
# 复制并安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
ENV COZE_INTEGRATION_BASE_URL=https://api.coze.cn \
COZE_INTEGRATION_MODEL_BASE_URL=https://api.coze.cn \
LLM_BASE_URL=https://api.coze.cn \
COZE_TRACING_ENABLED=false \
OPT_ENABLE_LONG_REPORT=false \
DISABLE_LOOP_TRACE=true \
LOOP_ENABLED=false \
COZE_LOOP_ENABLED=false \
COZE_TRACING_ENABLED=false \
OPT_ENABLE_LONG_REPORT=false
# 直接卸载 cozeloop彻底消灭报错
RUN pip uninstall -y cozeloop
# 复制项目文件
COPY . .
EXPOSE 8000
CMD ["python", "src/main.py", "-m", "http", "-p", "8000"]