animeic 2 years ago
parent
commit
209eb20d2b
2 changed files with 14 additions and 12 deletions
  1. 1 1
      Dockerfile
  2. 13 11
      docker-compose.yml

+ 1 - 1
Dockerfile

@@ -5,7 +5,7 @@ RUN apt-get update && \
     apt-get remove --purge -y && rm -rf /var/lib/apt/lists/*
 
 RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
-    pip install diskcache==5.2.1 fastapi==0.65.2 pymilvus==2.1.0 towhee==0.8.0 uvicorn==0.13.4 protobuf==3.20.2 opencv-python==4.6.0.66 torch==1.12.1 torchvision==0.13.1 Pillow==9.2.0 timm==0.6.7 && \
+    pip install diskcache==5.2.1 fastapi==0.65.2 pymilvus==2.1.0 towhee==0.8.0 uvicorn==0.13.4 protobuf==3.20.2 opencv-python==4.6.0.66 torch==1.12.1 torchvision==0.13.1 Pillow==9.2.0 timm==0.6.12 && \
     pip cache purge
 
 WORKDIR /app/src

+ 13 - 11
docker-compose.yml

@@ -1,5 +1,9 @@
 version: '3.8'
 
+networks:
+  default:
+    name: milvus
+
 services:
   # search-image:
   #   container_name: milvus-etcd
@@ -14,14 +18,12 @@ services:
   #   command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
 
   search-image:
-  image: registry.cn-chengdu.aliyuncs.com/infish/search-image:v1.0.0
-  restart: always
-  environment: 
-    MILVUS_HOST: milvus-standalone
-    MILVUS_PORT: 19530
-  volumes:
-    - ./tmp/images:/app/src/tmp/images
-  networks:
-    - milvus
-  ports:
-    - 5000:5000
+    image: registry.cn-chengdu.aliyuncs.com/infish/search-image:v1.0.0
+    restart: always
+    environment: 
+      MILVUS_HOST: milvus-standalone
+      MILVUS_PORT: 19530
+    volumes:
+      - ./tmp/images:/app/src/tmp/images
+    ports:
+      - 5000:5000