milvus向量数据库 2.29安装

目录
  • milvus向量数据库 2.29安装
    • docker-compose安装

milvus向量数据库 2.29安装

docker-compose安装

在这之前先安装docker-compose

//下载docker-compose.yml
wget https://github.com/milvus-io/milvus/releases/download/v2.2.9/milvus-standalone-docker-compose.yml -O docker-compose.yml


vim docker-compose.yml

version: '3.5'
services:
  etcd:
    container_name: milvus-etcd
    image: quay.io/coreos/etcd:v3.5.5
    environment:
      - ETCD_AUTO_COMPACTION_MODE=revision
      - ETCD_AUTO_COMPACTION_RETENTION=1000
      - ETCD_QUOTA_BACKEND_BYTES=4294967296
      - ETCD_SNAPSHOT_COUNT=50000
    volumes:
      - ${DOCKER_VOLUME_DIRECTORY:-/data/milvus2.2.9_data/dev}/volumes/etcd:/etcd
    command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd

  minio:
    container_name: milvus-minio
    image: minio/minio:RELEASE.2023-03-20T20-16-18Z
    environment:
      MINIO_ACCESS_KEY: minioadmin
      MINIO_SECRET_KEY: minioadmin
    volumes:
      - ${DOCKER_VOLUME_DIRECTORY:-/data/milvus2.2.9_data/dev}/volumes/minio:/minio_data    #这是shell的一种语法, 例如 ${Num:-/list},如果有Num变量,就直接用Num变量的值去拼接,如果没有定义Num,就用/list去拼接后面
    command: minio server /minio_data --console-address ":9001"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    ports:
      - "16900:9000"
      - "16901:9001"
      
  attu:    #这里的attu是控制台,默认的yml里是没有的,后面说到数据导出会再次提及,这里如果不需要控制台可以删掉
    container_name: attu
    image: zilliz/attu:v2.2.5
    environment:
      MILVUS_URL: milvus-standalone:19530
    ports:
      - "8000:3000"
    depends_on:
      - "standalone"
  standalone:
    container_name: milvus-standalone
    image: milvusdb/milvus:v2.2.9
    command: ["milvus", "run", "standalone"]
    environment:
      ETCD_ENDPOINTS: etcd:2379
      MINIO_ADDRESS: minio:9000
    volumes:
      - ${DOCKER_VOLUME_DIRECTORY:-/data/milvus2.2.9_data/dev}/volumes/milvus:/var/lib/milvus
    ports:
      - "19530:19530"
      - "9091:9091"
    depends_on:
      - "etcd"
      - "minio"

networks:
  default:
    name: milvus




//启动
docker-compose up -d

你可能感兴趣的:(milvus,数据库,java,开发语言)