Files
PlantAI-rag-new/tooling/legacy_docker_packager/Dockerfile.plantai
T
jerryandClaude Fable 5 27946edc2b P0/M1: 收编 encryption-test 工具链入 tooling/
- 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>
2026-08-31 12:59:29 +08:00

53 lines
2.3 KiB
Docker

ARG BASE_IMAGE=python:3.11-bookworm
FROM ${BASE_IMAGE}
ARG PIP_INDEX_URL=https://pypi.org/simple
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
PLANTAI_PROJECT_ROOT=/opt/plantai \
BBAV5_PROJECT_ROOT=/opt/plantai \
PLANTAI_RAG_ROOT=/opt/rag \
GENE_FAMILY_ROOT=/opt/qa \
PYTHONPATH=/opt/plantai
# Identify requires the HMMER and NCBI BLAST command-line tools. This is the
# minimum native runtime, not the old allenv/Conda environment.
RUN set -eux; \
if [ -f /etc/apt/sources.list.d/debian.sources ]; then \
sed -i 's|http://deb.debian.org|https://deb.debian.org|g; s|http://security.debian.org|https://security.debian.org|g' /etc/apt/sources.list.d/debian.sources; \
fi; \
if [ -f /etc/apt/sources.list ]; then \
sed -i 's|http://deb.debian.org|https://deb.debian.org|g; s|http://security.debian.org|https://security.debian.org|g' /etc/apt/sources.list; \
fi; \
apt-get -o Acquire::Retries=5 -o Acquire::https::Timeout=60 update; \
apt-get install -y --no-install-recommends hmmer ncbi-blast+; \
rm -rf /var/lib/apt/lists/*
COPY requirements/plantai.txt /tmp/requirements.txt
RUN python -m pip install --no-cache-dir -r /tmp/requirements.txt \
&& rm -f /tmp/requirements.txt
COPY work/context/PlantAI/ /opt/plantai/
RUN test -f /opt/plantai/.hardened-build.json \
&& python -c "import sys; assert sys.version_info[:2] == (3, 11)" \
&& test "$(find /opt/plantai -type f -name '*.so' | wc -l)" -gt 0 \
&& command -v hmmscan \
&& command -v hmmsearch \
&& command -v blastp \
&& command -v makeblastdb \
&& test -s /opt/plantai/data/hmm/Pfam-A.hmm \
&& test -s /opt/plantai/data/hmm/Pfam-A.hmm.h3f \
&& test -s /opt/plantai/data/hmm/Pfam-A.hmm.h3i \
&& test -s /opt/plantai/data/hmm/Pfam-A.hmm.h3m \
&& test -s /opt/plantai/data/hmm/Pfam-A.hmm.h3p \
&& test -s /opt/plantai/data/rag_db/pfam_mapping.json \
&& python -c "import json; p=json.load(open('/opt/plantai/data/rag_db/pfam_mapping.json')); assert p['SPL'] == 'PF03110'" \
&& mkdir -p /runtime/input /runtime/workspace /runtime/data /runtime/logs \
/runtime/service_data/memory_storage /runtime/service_data/cost_logs \
/runtime/service_data/reproducibility
WORKDIR /opt/plantai
CMD ["python", "apps/web/vue3/main.py"]