- legacy_plantai_server_package/: phase_a–f + compile_* + bin/plantai_admin.py + tools/(audit/elf_visibility/smoke/build_delivery_manifest) 完整基线 - legacy_docker_packager/: protected 形态参考 - crypto/client/: plantai_core.py(AES-GCM 原语) + install_plantai.sh 参考 - secrets/provision 严格排除(gitignore),入 git 前已脱敏清理 - LEGACY_MAPPING.md 记录源与改造方向 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
28 lines
1.1 KiB
Docker
28 lines
1.1 KiB
Docker
ARG BASE_IMAGE=python:3.12-bookworm
|
|
FROM ${BASE_IMAGE}
|
|
|
|
ARG PIP_INDEX_URL=https://pypi.org/simple
|
|
ARG TORCH_INDEX_URL=https://download.pytorch.org/whl/cpu
|
|
ARG TORCH_CPU_VERSION=2.13.0+cpu
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
PYTHONPATH=/opt/qa \
|
|
GENE_FAMILY_ROOT=/opt/qa
|
|
|
|
COPY requirements/qa.txt /tmp/requirements.txt
|
|
RUN python -m pip install --no-cache-dir \
|
|
--index-url "$TORCH_INDEX_URL" "torch==$TORCH_CPU_VERSION" \
|
|
&& python -m pip install --no-cache-dir -r /tmp/requirements.txt \
|
|
&& rm -f /tmp/requirements.txt
|
|
|
|
COPY work/context/QA/ /opt/qa/
|
|
RUN test -f /opt/qa/.hardened-build.json \
|
|
&& python -c "import sys; assert sys.version_info[:2] == (3, 12)" \
|
|
&& python -c "import torch; assert torch.__version__ == '$TORCH_CPU_VERSION'; assert torch.version.cuda is None" \
|
|
&& test "$(find /opt/qa -type f -name '*.so' | wc -l)" -gt 0
|
|
|
|
WORKDIR /opt/qa
|
|
CMD ["python", "-m", "uvicorn", "scripts.qa_v1_1_73_server:app", "--host", "0.0.0.0", "--port", "7925"]
|