milvus的二进制文件集群部署

milvus的二进制文件集群部署

本文使用二进制文件进行milvus集群的部署,非docker,非k8s部署。

环境说明

操作系统:Ubuntu 22.04.3

milvus版本:v2.4.10

获取二进制文件

由于官方提供的是docker文件,因此我们可以把容器里面的二进制文件及其它库文件拷贝出来。

从dockerfile文件可以窥探出。

dockerfile 复制代码
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.

FROM ubuntu:jammy-20240530

ARG TARGETARCH

RUN apt-get update && \
    apt-get install -y --no-install-recommends curl ca-certificates libaio-dev libgomp1 libopenblas-dev && \
    apt-get remove --purge -y && \
    rm -rf /var/lib/apt/lists/*

COPY --chown=root:root --chmod=774 ./bin/ /milvus/bin/

COPY --chown=root:root --chmod=774 ./configs/ /milvus/configs/

COPY --chown=root:root --chmod=774 ./lib/ /milvus/lib/

ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true

# Add Tini
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

WORKDIR /milvus/

从dockerfile可以看出来,我们只需要安装依赖的包,把对应文件拷贝出来即可。

部署二进制

将容器里的/milvus文件夹打包拷贝出来。

shell 复制代码
docker cp milvus-standalone:/milvus .

安装依赖:

复制代码
apt-get install --no-install-recommends curl ca-certificates libaio-dev libgomp1 libopenblas-dev

设置环境变量:

vi .bashrc

复制代码
export LD_PRELOAD=/opt/milvus/lib/libjemalloc.so
export LD_LIBRARY_PATH=/opt/milvus/lib::/usr/lib
export MALLOC_CONF=background_thread:true

运行milvus文件验证:

复制代码
bin/milvus --help

如果不报错,即配置正确。

部署etcd、pulsar、minio、attu

这3个服务,我们还是以docker形式进行部署。

具体如何部署,参考以前的文章。

相关推荐
ai大模型-探索者3 天前
BGE-M3三种向量在Milvus怎么存(稠密、稀疏、多向量)
milvus·稀疏·多向量·稠密
唠点键盘之外的5 天前
29 切片的权限隔离(实战篇):Milvus + Spring AI,从 0 搭一条带权限过滤的检索链路
人工智能·spring·milvus
ai大模型-探索者5 天前
Milvus向量数据库(介绍与使用)
数据库·milvus
Crayon Lin6 天前
Milvus向量数据库入门
数据库·milvus
一木 之林8 天前
LangChain 第9章 RAG 与项目实战:文档切分、嵌入、Milvus 与客服知识库
人工智能·计算机视觉·langchain·milvus
今年下半年8 天前
AI智能体项目实战记录(05):RAG项目实战之向量知识库milvus部署
人工智能·llm·milvus·rag
BD_Marathon8 天前
Milvus数据库的DQL操作
milvus
xian_wwq8 天前
【学习笔记】Milvus 是什么?为什么 RAG 系统经常使用它?-14
笔记·学习·milvus
BD_Marathon9 天前
Milvus数据库的DML操作
数据库·milvus
BD_Marathon9 天前
Milvus使用指南
milvus