当前位置: 首页 > news >正文

吐血整理:在 Docker 中运行 Milvus

直接用docker 错误命令(这个我试了三遍,浪费了很多时间):

docker run -d --name milvus -p 19530:19530 -p 9091:9091 -v /var/lib/milvus:/var/lib/milvus milvusdb/milvus:latest

先看报错:

2025-02-24 16:02:39 ERROR: ld.so: object '/milvus/lib/' from LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
2025-02-24 16:02:39 tini (tini version 0.19.0 - git.de40ad0)
2025-02-24 16:02:39 Usage: tini [OPTIONS] PROGRAM -- [ARGS] | --version
2025-02-24 16:02:39 
2025-02-24 16:02:39 Execute a program under the supervision of a valid init process (tini)
2025-02-24 16:02:39 
2025-02-24 16:02:39 Command line options:
2025-02-24 16:02:39 
2025-02-24 16:02:39   --version: Show version and exit.
2025-02-24 16:02:39   -h: Show this help message and exit.
2025-02-24 16:02:39   -s: Register as a process subreaper (requires Linux >= 3.4).
2025-02-24 16:02:39   -p SIGNAL: Trigger SIGNAL when parent dies, e.g. "-p SIGKILL".
2025-02-24 16:02:39   -v: Generate more verbose output. Repeat up to 3 times.
2025-02-24 16:02:39   -w: Print a warning when processes are getting reaped.
2025-02-24 16:02:39   -g: Send signals to the child's process group.
2025-02-24 16:02:39   -e EXIT_CODE: Remap EXIT_CODE (from 0 to 255) to 0.
2025-02-24 16:02:39   -l: Show license and exit.
2025-02-24 16:02:39 
2025-02-24 16:02:39 Environment variables:
2025-02-24 16:02:39 
2025-02-24 16:02:39   TINI_SUBREAPER: Register as a process subreaper (requires Linux >= 3.4).
2025-02-24 16:02:39   TINI_VERBOSITY: Set the verbosity level (default: 1).
2025-02-24 16:02:39   TINI_KILL_PROCESS_GROUP: Send signals to the child's process group.
2025-02-24 16:02:39 
2025-02-24 16:06:03 ERROR: ld.so: object '/milvus/lib/' from LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
2025-02-24 16:06:03 tini (tini version 0.19.0 - git.de40ad0)
2025-02-24 16:06:03 Usage: tini [OPTIONS] PROGRAM -- [ARGS] | --version
2025-02-24 16:06:03 
2025-02-24 16:06:03 Execute a program under the supervision of a valid init process (tini)
2025-02-24 16:06:03 
2025-02-24 16:06:03 Command line options:
2025-02-24 16:06:03 
2025-02-24 16:06:03   --version: Show version and exit.
2025-02-24 16:06:03   -h: Show this help message and exit.
2025-02-24 16:06:03   -s: Register as a process subreaper (requires Linux >= 3.4).
2025-02-24 16:06:03   -p SIGNAL: Trigger SIGNAL when parent dies, e.g. "-p SIGKILL".
2025-02-24 16:06:03   -v: Generate more verbose output. Repeat up to 3 times.
2025-02-24 16:06:03   -w: Print a warning when processes are getting reaped.
2025-02-24 16:06:03   -g: Send signals to the child's process group.
2025-02-24 16:06:03   -e EXIT_CODE: Remap EXIT_CODE (from 0 to 255) to 0.
2025-02-24 16:06:03   -l: Show license and exit.
2025-02-24 16:06:03 
2025-02-24 16:06:03 Environment variables:
2025-02-24 16:06:03 
2025-02-24 16:06:03   TINI_SUBREAPER: Register as a process subreaper (requires Linux >= 3.4).
2025-02-24 16:06:03   TINI_VERBOSITY: Set the verbosity level (default: 1).
2025-02-24 16:06:03   TINI_KILL_PROCESS_GROUP: Send signals to the child's process group.
2025-02-24 16:06:03

这个错误信息主要有两个部分:

  1. ld.so: object '/milvus/lib/' from LD_PRELOAD cannot be preloaded:这个错误通常与库预加载配置有关,LD_PRELOAD 环境变量指定的库文件无法被正确读取。可能是路径 /milvus/lib/ 指定不正确,或者是该路径下没有实际存在的库文件。你可以检查是否该路径下有有效的 .so 文件,并确保路径配置正确。

  2. tini 使用信息:这是容器启动过程中调用 tini 的输出,tini 是一个用于处理进程管理的工具,通常用于确保容器中运行的程序是由一个有效的初始化进程管理的。这个输出本身并不是错误,它只是提供了 tini 的帮助信息。

然后去官网找到了安装方法: 在 Docker(Linux)中运行 Milvus | Milvus 文档

 步骤这边贴出来:

前提条件:

  • 安装 Docker Desktop。

  • 安装 Windows Subsystem for Linux 2 (WSL 2)。

  • 安装 Python 3.8+。

在 Docker 中运行 Milvus

Milvus 提供了一个安装脚本,可将其安装为 Docker 容器。在 Microsoft Windows 上安装 Docker Desktop 后,就可以在管理员模式下通过 PowerShell 或 Windows Command Prompt 以及 WSL 2 访问 Docker CLI。

从 PowerShell 或 Windows 命令提示符

如果你更熟悉 PowerShell 或 Windows Command Prompt,命令提示符如下。

  1. 在管理员模式下右击并选择以管理员身份运行,打开 Docker Desktop。

  2. 下载安装脚本并将其保存为standalone.bat 。

Invoke-WebRequest https://raw.githubusercontent.com/milvus-io/milvus/refs/heads/master/scripts/standalone_embed.bat -OutFile standalone.bat

运行下载的脚本,将 Milvus 作为 Docker 容器启动。

C:\>standalone.bat start
Wait for Milvus starting...
Start successfully.
To change the default Milvus configuration, edit user.yaml and restart the service.

运行安装脚本后

  • 名为Milvus-standalone的 docker 容器已在19530 端口启动。

  • 嵌入式 etcd 与 Milvus 安装在同一个容器中,服务端口为2379。其配置文件被映射到当前文件夹中的embedEtcd.yaml

  • Milvus 数据卷被映射到当前文件夹中的volumes/milvus

可以使用以下命令管理 Milvus 容器和存储的数据。

C:\>standalone.bat stop
Stop successfully.

C:\>standalone.bat delete
Delete Milvus container successfully. # Container has been removed.
Delete successfully. # Data has been removed.

相关文章:

  • H13-821 V3.0 HCIP 云服务架构题题库
  • 平滑升级旧版nginx,支持lua动态代理转发多个云平台VNC画面
  • 9. centos 离线安装docker
  • MES生产制造执行管理系统(源码+配套文档)
  • 解决IDEA使用Ctrl + / 注释不规范问题
  • 使用机器学习进行土地覆盖分类
  • 游戏引擎学习第122天
  • vLLM专题(十四)-自动前缀缓存
  • windows、Linux 设置 SSH 密钥并连接到 GitHub
  • Flash-03
  • ARM Cortex-M处理器中的MSP和PSP
  • 双周报Vol.66: String模式匹配增强、while条件支持使用 is 表达式、新增IDE安装器...多项核心技术更新!
  • 前端包管理工具进化论:npm vs yarn vs pnpm 深度对比
  • 【软考】计算机软件著作权的保护期
  • 高级系统架构师--第十章:计算机网络
  • 【初阶数据结构】链表的柔光之美
  • 软件工程----瀑布模型
  • 【Python模块】——pymysql
  • 华为hcia——Datacom实验指南——二层交换原理
  • 一键导出数据库表到Excel
  • 网站建设资料清单/百度问一问付费咨询
  • 网页制作素材是什么/seo网站建设
  • wap免费网站/兰州百度推广的公司
  • 长宁区网站建设开/青岛网站优化
  • ps网页设计作品欣赏/seo搜索引擎优化工资多少钱
  • wordpress oss/seo综合查询站长工具怎么用