1、安装docker compose
- 我们可以从 Github 上下载它的二进制包来利用,最新发行的版本地点:
https://github.com/docker/compose/releases
- sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
复制代码- $ sudo chmod +x /usr/local/bin/docker-compose
复制代码- $ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
复制代码 2、安装GPU驱动
已安装好的朋友,这步可以跳过
- sudo apt install --no-install-recommends nvidia-headless-545 nvidia-utils-545
复制代码 3、下载安装milvus
1.Download milvus-standalone-docker-compose-gpu.yml
- wget https://github.com/milvus-io/milvus/releases/download/v2.4.0-rc.1/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
复制代码 各人根据自己的硬件设置,利用单GPU,还是利用多GPU都可以。在docker-compose.yml文件中更改。
单GPU:
- ...
- standalone:
- gpu:
- initMemSize: 0
- maxMemSize: 1024
- ...
- deploy:
- resources:
- reservations:
- devices:
- - driver: nvidia
- capabilities: ["gpu"]
- device_ids: ["0"]
- ...
复制代码 多GPU:
- ...
- standalone:
- gpu:
- initMemSize: 0
- maxMemSize: 1024
- ...
- deploy:
- resources:
- reservations:
- devices:
- - driver: nvidia
- capabilities: ["gpu"]
- device_ids: ['0', '1']
- ...
复制代码 2.Start Milvus
在docker-compose.yml路径下,
- sudo docker compose up -d
复制代码 或
- sudo docker-compose up -d
复制代码 启动后会表现:
Creating milvus-etcd … done
Creating milvus-minio … done
Creating milvus-standalone … done
3.验证安装
Milvus 单机版启动后,将有三个 docker 容器在运行,包括 Milvus 单机版服务及其两个依赖项。
- Name Command State Ports
- --------------------------------------------------------------------------------------------------------------------
- milvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp
- milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp
- milvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp
复制代码 4.Stop Milvus
关闭Milvus standalone:
在关闭Milvus后删除数据:
参考链接:https://milvus.io/docs/install_standalone-docker-compose-gpu.md
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |