From 01457b4ffb3b8d1b885f94d4cdb1e286a6fcea78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Thu, 7 May 2026 23:16:50 +0800 Subject: [PATCH] Dockerfile.modelscope --- Dockerfile.modelscope | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.modelscope b/Dockerfile.modelscope index 5a07676..841e04f 100644 --- a/Dockerfile.modelscope +++ b/Dockerfile.modelscope @@ -56,9 +56,9 @@ FROM base AS bytecode-builder # 复制应用代码,仅在构建阶段编译为字节码 COPY . . -RUN python -m compileall -b /app && \ - find /app -type f -name '*.py' -delete && \ - find /app -type d -name '__pycache__' -prune -exec rm -rf {} + +RUN python -m compileall -b -x '(/projects/|/skills/)' /app && \ + find /app -not -path '/app/projects/*' -not -path '/app/skills/*' -type f -name '*.py' -delete && \ + find /app -not -path '/app/projects/*' -not -path '/app/skills/*' -type d -name '__pycache__' -prune -exec rm -rf {} + FROM base AS runtime