1 Commits

Author SHA1 Message Date
Codex
71ea49b4c9 Vendor Python dependencies for offline image builds 2026-07-27 19:22:06 +08:00
8 changed files with 6 additions and 2 deletions

View File

@@ -7,7 +7,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY vendor/ ./vendor/
RUN pip install --no-cache-dir --no-index --find-links=/app/vendor -r requirements.txt
COPY . .
RUN mkdir -p /app/pipeline_outputs

View File

@@ -50,6 +50,9 @@ docker run --rm -p 8080:8080 \
镜像监听 `8080` 端口,并处理 `SIGTERM`。收到停机信号后,后台等待和轮询
会立即停止;进行中的 HTTP 请求最长等待 20 秒,随后关闭会话并退出。
`vendor/` 保存了 Linux x86_64 / Python 3.11 的离线 wheel。镜像构建不会访问
PyPI避免平台构建环境网络较慢时发生依赖下载超时。
运行时产生的断点文件位于 `/app/pipeline_outputs`。如需跨 Pod 保留断点,
应为该目录挂载持久卷。

View File

@@ -1 +1 @@
requests>=2.31.0,<3.0.0
requests==2.34.2

Binary file not shown.

BIN
vendor/idna-3.18-py3-none-any.whl vendored Normal file

Binary file not shown.

BIN
vendor/requests-2.34.2-py3-none-any.whl vendored Normal file

Binary file not shown.

BIN
vendor/urllib3-2.7.0-py3-none-any.whl vendored Normal file

Binary file not shown.