Spaces:
Sleeping
Sleeping
File size: 653 Bytes
aec7019 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 优化后端 + OPC UA 仿真服务器(同一镜像,compose 里用不同 command 起两个服务)
FROM python:3.11-slim
WORKDIR /app
# numpy/scipy/cryptography 均有 manylinux wheel,slim 直接装无需编译
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app ./app
COPY config ./config
COPY tools ./tools
# 运行时曲线覆盖持久化到 /data(compose 挂卷)
ENV BIDITECH_CURVE_OVERRIDES=/data/curve_overrides.json
RUN mkdir -p /data
EXPOSE 8077 4840
# 默认起优化 API;OPC UA 仿真服务器由 compose 覆盖 command
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8077"]
|