This commit is contained in:
hailin 2025-09-21 23:01:28 +08:00
parent 349a56ac77
commit ad93b283a5
1 changed files with 12 additions and 5 deletions

View File

@ -187,12 +187,19 @@ RUN mkdir -p /wheels && \
pip wheel filelock typing-extensions sympy fsspec jinja2 networkx -w /wheels pip wheel filelock typing-extensions sympy fsspec jinja2 networkx -w /wheels
# ── ✅ 再打包 runtime 阶段必需依赖 ──────────────────────────────────────────── # ── ✅ 再打包 runtime 阶段必需依赖 ────────────────────────────────────────────
RUN pip wheel \ # RUN pip wheel \
pydantic orjson psutil pyzmq pynvml \ # pydantic orjson psutil pyzmq pynvml \
transformers==4.56.0 uvicorn fastapi IPython aiohttp \ # transformers==4.56.0 uvicorn fastapi IPython aiohttp \
setproctitle uvloop sentencepiece triton pillow cachetools msgspec blake3 cloudpickle compressed-tensors einops openai py-cpuinfo dill partial_json_parser python-multipart torchao \ # setproctitle uvloop sentencepiece triton pillow cachetools msgspec blake3 cloudpickle compressed-tensors einops openai py-cpuinfo dill partial_json_parser python-multipart torchao \
-w /wheels # -w /wheels
# ── ✅ 再打包 runtime 阶段必需依赖(本地优先;缺了再联网) ────────────────────────
RUN bash -lc '\
set -euo pipefail; \
PKGS="pydantic orjson psutil pyzmq pynvml transformers==4.56.0 uvicorn fastapi IPython aiohttp setproctitle uvloop sentencepiece triton pillow cachetools msgspec blake3 cloudpickle compressed-tensors einops openai py-cpuinfo dill partial_json_parser python-multipart torchao"; \
pip wheel --no-index --find-links=/wheels -w /wheels $PKGS || true; \
pip wheel -c /tmp/local_constraints_build.txt --find-links=/wheels --prefer-binary -w /wheels $PKGS \
'
# 产出 openai-harmony 的离线 wheel # 产出 openai-harmony 的离线 wheel
RUN pip wheel --no-deps openai-harmony==0.0.4 -w /wheels RUN pip wheel --no-deps openai-harmony==0.0.4 -w /wheels