Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Run Milvus with GPU Support Using Docker Compose,After modifying the yaml file, an error message appears: docker-compose.yml: services.standalone Additional property gpu is not allowed #33903

Open
1 task done
youqugit opened this issue Jun 17, 2024 · 6 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@youqugit
Copy link

youqugit commented Jun 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:2.4.4
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

When I refer to the official document Run Milvus with GPU Support Using Docker Compose, I modified the yaml file to configure

gpu:
    initMemSize:
    maxMemSize:

I execute this command docker compose up -d . Then I encountered an error: validating milvus_deploy/docker-compose.yml: services.standalone Additional property gpu is not allowed

Below is the yaml file I modified:

version: '3.5'

services:
  etcd:
    container_name: milvus-etcd
    image: m.daocloud.io/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:-.}/volumes/etcd:/etcd
    command: etcd -advertise-client-urls=http://127.0.0.1:2389 -listen-client-urls http://0.0.0.0:2389 --data-dir /etcd
    healthcheck:
      test: [ "CMD", "etcdctl", "endpoint", "health" ]
      interval: 30s
      timeout: 20s
      retries: 3

  minio:
    container_name: milvus-minio
    image: m.daocloud.io/docker.io/minio/minio:RELEASE.2024-03-26T22-10-45Z
    environment:
      MINIO_ACCESS_KEY: minioadmin
      MINIO_SECRET_KEY: minioadmin
    ports:
      - "9001:9001"
      - "9000:9000"
    volumes:
      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
    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

  standalone:
    gpu:
      initMemSize: 5120
      maxMemSize: 10240
    container_name: milvus-standalone
    image: m.daocloud.io/docker.io/milvusdb/milvus:v2.4.4-gpu
    command: [ "milvus", "run", "standalone" ]
    security_opt:
      - seccomp:unconfined
    environment:
      ETCD_ENDPOINTS: etcd:2389
      MINIO_ADDRESS: minio:9000
    volumes:
      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
    ports:
      - "3005:19530"
      - "9091:9091"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [ "gpu" ]
              device_ids: [ "0", "1", "2" ]
    depends_on:
      - "etcd"
      - "minio"

networks:
  default:
    name: milvus

Expected Behavior

Correctly configure initMemSize maxMemSize: parameters

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@youqugit youqugit added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 17, 2024
@yanliang567
Copy link
Contributor

@youqugit �I don't think docker compose supports the following configs. please retry after remove the configs below

gpu:
      initMemSize: 5120
      maxMemSize: 10240

/assign @youqugit
/unassign

@sre-ci-robot sre-ci-robot assigned youqugit and unassigned yanliang567 Jun 17, 2024
@yanliang567 yanliang567 added help wanted Extra attention is needed and removed kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 17, 2024
@youqugit
Copy link
Author

@youqugit �I don't think docker compose supports the following configs. please retry after remove the configs below

gpu:
      initMemSize: 5120
      maxMemSize: 10240

/assign @youqugit /unassign

Thank you, where should I write the configuration shown in the picture below?

4772A903-FF12-4f34-B73B-6EAB0C7036E1

@yanliang567
Copy link
Contributor

/assign @Presburger
please help to take a look
/unassign

@yanliang567
Copy link
Contributor

@youqugit it is a document bug, we will update the doc immediately. For docker compose deployment, please remove the configs below in docker compose yaml.

gpu:
      initMemSize: 5120
      maxMemSize: 10240

@youqugit
Copy link
Author

@youqugit it is a document bug, we will update the doc immediately. For docker compose deployment, please remove the configs below in docker compose yaml.

gpu:
      initMemSize: 5120
      maxMemSize: 10240

I have successfully deployed Milvus, but I would still like to know how to modify the configuration. I will wait for your documentation to be updated. In the meantime, can I refer to the "Configure Milvus with Docker Compose" section for configuration modifications?

@Presburger
Copy link
Contributor

Presburger commented Jun 19, 2024

@youqugit hi, In Milvus version 2.4.1 and later (excluding 2.4.1), the memory pool settings only need to be set to a smaller value. The memory pool will only be used for the allocation of temporary variables during searches. Index loading will not go through the memory pool, which can effectively improve memory utilization. This also makes it easier to monitor memory usage.
version <=2.4.1

gpu:
      initMemSize: 0
      maxMemSize: 0

will automatic use half gpu mem for init and all for max.

version>2.4.1

gpu:
      initMemSize: 1024
      maxMemSize: 2048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants