From dbd934cdda9f2e70dc8665ca77423a519aac2155 Mon Sep 17 00:00:00 2001 From: SZCJW <792430652@qq.com> Date: Mon, 30 Mar 2026 23:27:58 +0800 Subject: [PATCH] x --- Dockerfile | 3 +++ README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8eded85..4792cbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,9 @@ COPY requirements.txt /workspace/requirements.txt RUN pip install --no-cache-dir --retries 20 --timeout 600 -i https://pypi.tuna.tsinghua.edu.cn/simple -r /workspace/requirements.txt \ || pip install --no-cache-dir --retries 20 --timeout 600 -i https://mirrors.aliyun.com/pypi/simple -r /workspace/requirements.txt \ || pip install --no-cache-dir --retries 20 --timeout 600 -r /workspace/requirements.txt +RUN pip install --no-cache-dir --retries 20 --timeout 600 -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade --pre transformers \ + || pip install --no-cache-dir --retries 20 --timeout 600 -i https://mirrors.aliyun.com/pypi/simple --upgrade --pre transformers \ + || pip install --no-cache-dir --retries 20 --timeout 600 --upgrade --pre transformers COPY app /workspace/app diff --git a/README.md b/README.md index b176a20..c21c830 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ curl -X POST "http://localhost:8001/v1/chat/completions" \ ## 常见故障排查 -- 报错 `model type ... Transformers does not recognize this architecture` 时,说明当前模型与镜像内依赖不兼容,建议更换模型或升级镜像版本。 +- 报错 `model type ... Transformers does not recognize this architecture` 时,先确认已使用当前 Dockerfile 重建镜像(其中会升级 `transformers`),并执行 `docker compose build --no-cache` 后再启动。 - 报错 `model config (gptq) does not match quantization argument (gptq_marlin)` 时,将该模型配置改为 `dtype=float16` 且 `quantization=gptq`。 - 报错 `RPC call to sample_tokens timed out` 或出现 `GPU core dump` 时,先下调模型配置为更稳参数:`ctx=32768`、`max_num_seqs=4`、`max_tokens=2048`、`gpu_util=0.90`,并开启 `enforce_eager=true`。 - 若模型目录存在但仍加载失败,检查挂载路径是否为 `/opt/model:/opt/model:ro`,并确认容器内可见模型文件。