2 Commits f496ea0408 ... 8d628119fa

Author SHA1 Message Date
  luojunhui 8d628119fa init 2 days ago
  luojunhui 31988e59de init 2 days ago
1 changed files with 30 additions and 19 deletions
  1. 30 19
      docker-compose.yml

+ 30 - 19
docker-compose.yml

@@ -1,4 +1,3 @@
-version: "3.8"
 services:
   # vLLM - Qwen3 0.6B
   vllm-0.6b:
@@ -6,14 +5,20 @@ services:
     container_name: vllm-qwen3-0.6b
     ports:
       - "8100:8000"
-    environment:
-      - HF_ENDPOINT=https://hf-mirror.com
     command: >
       --model Qwen/Qwen3-Embedding-0.6B
       --dtype float16
       --port 8000
     volumes:
-      - ./models:/root/.cache/huggingface
+      # 挂载预下载的模型目录
+      - ./models/Qwen3-Embedding-0.6B:/app/models/Qwen3-Embedding-0.6B
+      # 可选:挂载缓存目录
+      - ./cache:/root/.cache/huggingface
+    environment:
+      # 设置 Hugging Face 国内镜像
+      - HF_ENDPOINT=https://hf-mirror.com
+      # 可选:设置 Python 包索引镜像
+      - PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
     deploy:
       resources:
         reservations:
@@ -21,7 +26,13 @@ services:
             - driver: nvidia
               count: all
               capabilities: [ gpu ]
-
+    # 添加健康检查
+    healthcheck:
+      test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
+      interval: 30s
+      timeout: 10s
+      retries: 3
+      start_period: 40s
 #  # vLLM - Qwen3 4B
 #  vllm-4b:
 #    image: vllm/vllm-openai:latest
@@ -49,17 +60,17 @@ services:
 #      - ./models:/root/.cache/huggingface
 
   # Milvus 向量数据库
-  milvus:
-    image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/milvusdb/milvus:v2.4.5
-#    image: milvusdb/milvus:v2.4.4-standalone
-    container_name: milvus
-    ports:
-      - "19530:19530"
-      - "9091:9091"
-    environment:
-      - ETCD_USE_EMBED=true
-      - MINIO_USE_EMBED=true
-      - PULSAR_USE_EMBED=true
-    volumes:
-      - ./milvus_data:/var/lib/milvus
-    command: ["milvus", "run", "standalone"]
+#  milvus:
+#    image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/milvusdb/milvus:v2.4.5
+##    image: milvusdb/milvus:v2.4.4-standalone
+#    container_name: milvus
+#    ports:
+#      - "19530:19530"
+#      - "9091:9091"
+#    environment:
+#      - ETCD_USE_EMBED=true
+#      - MINIO_USE_EMBED=true
+#      - PULSAR_USE_EMBED=true
+#    volumes:
+#      - ./milvus_data:/var/lib/milvus
+#    command: ["milvus", "run", "standalone"]