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形式进行部署。

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

相关推荐
童先生3 天前
吐血整理:在 Docker 中运行 Milvus
数据库·docker·容器·milvus
IT古董9 天前
【开源向量数据库】Milvus简介
数据库·开源·milvus
大龄码农有梦想10 天前
Springboot集成Spring AI和Milvus,验证RAG构建过程
人工智能·spring boot·spring·milvus·知识库·rag·spring ai
小枫@码13 天前
Deepseek 671B + Milvus 搭建个人知识库
milvus
大龄码农有梦想14 天前
Springboot集成Milvus和Embedding服务,实现向量化检索
spring boot·embedding·milvus·向量检索·spring ai
AI-智能16 天前
DeepSeek入门到精通!(清华大学104页ppt下载)
人工智能·程序员·langchain·编程·llama·milvus·deepseek
Zilliz Planet17 天前
低成本+高性能+超灵活!Deepseek 671B+Milvus重新定义知识库搭建
milvus
大龄码农有梦想17 天前
SpringBoot集成Milvus,实现数据增删改查
人工智能·spring boot·ai·springboot·milvus·向量数据库
Carry_NJ17 天前
给milvus添加账号密码
milvus
大龄码农有梦想17 天前
MacOS安装Milvus向量数据库
macos·milvus·向量数据库·安装部署·milvus安装