luojunhui 2 days ago
parent
commit
2781dfa55d
1 changed files with 10 additions and 7 deletions
  1. 10 7
      Dockerfile

+ 10 - 7
Dockerfile

@@ -1,11 +1,14 @@
-FROM python:3.11-slim
+# 基础镜像
+FROM egs-registry.cn-hangzhou.cr.aliyuncs.com/egs/vllm:0.8.2-pytorch2.6-cu124-20250328
 
-# 安装构建工具
-RUN apt-get update && apt-get install -y \
-    git build-essential cmake ninja-build wget curl && \
-    rm -rf /var/lib/apt/lists/*
+# 设置工作目录
+WORKDIR /workspace
 
-# 安装 vllm
-RUN pip install --no-cache-dir vllm -i https://pypi.tuna.tsinghua.edu.cn/simple
+# 如果需要复制宿主机上的模型,可以提前 COPY
+# COPY models /models
 
+# 默认用 Python 启动 vLLM API Server
+ENTRYPOINT ["python", "-m", "vllm.entrypoints.openai.api_server"]
 
+# 默认参数(可以在 docker run 里覆盖)
+CMD ["--model", "/models/Qwen3-Embedding-0.6B", "--dtype", "float16"]