如果出现以上报错,有可能是containerd.service和docker.service服务需要重启进行解决,但重启之后还是报出同样的错,有可能是containerd.io的rpm包版本和所安装的docker版本不兼容造成,需要更改containerd.io的rpm包的版本,并重新安装,本次采用的是containerd.io-1.3.7-3.1.el7.x86_64.rpm。

更换containerd.io包的版本后,docker可以正常拉取镜像文件,如下所示:

class="table-box">

[root@Centos7 docker]# docker pull nginx

Using default tag: latest

latest: Pulling from library/nginx

a378f10b3218: Pull complete

5b5e4b85559a: Pull complete

508092f60780: Pull complete

59c24706ed13: Pull complete

1a8747e4a8f8: Pull complete

ad85f053b4ed: Pull complete

3000e3c97745: Pull complete

Digest: sha256:35e16351c585c0721f099bc638423cedc41efcd0f2da986f89ab441989e1768f

Status: Downloaded newer image for nginx:latest

docker.io/library/nginx:latest

2.1.6、docker-compose安装

下载地址:Releases · docker/compose · GitHub,可以下载最新版本,下载完成之后,把该文件改名放到docker的bin目录即可。

[root@Centos7 milvus]# cp docker-compose-linux-x86_64 /app/docker/bin/docker-compose

[root@Centos7 milvus]# source /etc/profile.d/docker.sh

[root@Centos7 milvus]# docker-compose -v

Docker Compose version v2.23.0

2.2、Python的安装

本次采用python3.10以上的版本进行安装,版本太低的话,有可能以后模型与向量结合时会出现未知问题,所以采用python3.10以上的版本进行安装。

下载地址:Download Python | Python.org 本次采用的是3.10.13的版本包Python-3.10.13.tgz。

[root@Centos7 milvus]# tar -xvf Python-3.10.13.tgz

[root@Centos7 milvus]# cd Python-3.10.13

[root@Centos7 milvus]# ./configure –prefix=/app/docker310

[root@Centos7 milvus]# make –j2

[root@Centos7 milvus]# make install

make -j2:主要是为了提高编译速度,其是2是代表cpu的核心个数,一般是核心个数的2倍,可采用或不采用,如果不采用,直接执行make即可。

注:如果在编译安装的过程中有报错,有可能是操作系统缺少一些开发包造成,可以根据报错信息用yum安装一下对应有开发包即可,如:缺少zlib的开发包,直接安装zlib-devel对应包即可。

2.2.1、配置python环境变量

[root@Centos7 milvus]# vi /etc/profile.d/python.sh

添加如下内容:

PYTHON_HOME=/app/python310

PATH=$PATH:$PYTHON_HOME/bin

export PATH PYTHON_HOME

[root@Centos7 milvus]# source /etc/profile.d/python.sh

[root@Centos7 milvus]# python3 -V

Python 3.10.13

2.3、Milvus的安装

下载地址:Releases · milvus-io/milvus · GitHub 下载自己想用的版本即可,本次采用的是2.3.2的版本,下载时有2种类型可供选择,gpu版本和内存版本,本次采用的是内存版本,把下载好的milvus-standalone-docker-compose.yml文件改名放到自己规划好的目录下,改成docker-compose.yml执行安装即可。

[root@Centos7 milvus]# cp milvus-standalone-docker-compose.yml /app/milvus

[root@Centos7 milvus]# docker-compse up

class="table-box">

[root@Centos7 milvus]# docker-compse up

[+] Running 23/23

 ✔ minio 6 layers [⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                      302.2s

   ✔ c7e856e03741 Pull complete                                                                                                                        117.1s

   ✔ c1ff217ec952 Pull complete                                                                                                                         96.6s

   ✔ b12cc8972a67 Pull complete                                                                                                                        110.3s

   ✔ 4324e307ea00 Pull complete                                                                                                                        127.9s

   ✔ 152089595ebc Pull complete                                                                                                                        127.7s

   ✔ 05f217fb8612 Pull complete                                                                                                                        184.1s

 ✔ standalone 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                404.1s

   ✔ d5fd17ec1767 Pull complete                                                                                                                         69.5s

   ✔ 50e2e2559689 Pull complete                                                                                                                         57.5s

   ✔ 9997e6050d5b Pull complete                                                                                                                        104.0s

   ✔ 7061d965979a Pull complete                                                                                                                         69.1s

   ✔ 3db6d0e6aa97 Pull complete                                                                                                                        292.8s

   ✔ 1f27396f6efc Pull complete                                                                                                                         82.2s

   ✔ fe556ec02776 Pull complete                                                                                                                         99.2s

 ✔ etcd 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                      159.5s

   ✔ dbba69284b27 Pull complete                                                                                                                         75.1s

   ✔ 270b322b3c62 Pull complete                                                                                                                         22.0s

   ✔ 7c21e2da1038 Pull complete                                                                                                                         19.9s

   ✔ cb4f77bfee6c Pull complete                                                                                                                         38.1s

   ✔ e5485096ca5d Pull complete                                                                                                                         32.2s

   ✔ 3ea3736f61e1 Pull complete                                                                                                                         46.9s

   ✔ 1e815a2c4f55 Pull complete                                                                                                                         52.9s

[+] Building 0.0s (0/0)                                                                                                                        docker:default

[+] Running 4/4

 ✔ Network milvus               Created                                                                                                                  0.2s

 ✔ Container milvus-minio       Created                                                                                                                  3.1s

 ✔ Container milvus-etcd        Created                                                                                                                  3.1s

 ✔ Container milvus-standalone  Created

注:初次使用安装环境,有可能会卡住,或下载安装一半就会断掉,此时可以尝试重启docker.service服务后,再次执行docker-compose up。

此时安装过程比较慢,请耐心等待即可。

安装完成之后会直接进行启动,docker-compose up是前台启动,可以使用docker-compose down停掉后,用docker-compose up -d后台启动,启动完成之后,可以使用docker-compose ps 进行查看运行状态。

[root@Centos7 milvus]# docker-compose ps

class="table-box">

[root@Centos7 milvus]# docker-compose ps

NAME                IMAGE                                      COMMAND                   SERVICE      CREATED        STATUS                  PORTS

milvus-etcd         quay.io/coreos/etcd:v3.5.5                 "etcd -advertise-cli…"   etcd         25 hours ago   Up 25 hours (healthy)   2379-2380/tcp

milvus-minio        minio/minio:RELEASE.2023-03-20T20-16-18Z   "/usr/bin/docker-ent…"   minio        25 hours ago   Up 25 hours (healthy)   0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp

milvus-standalone   milvusdb/milvus:v2.3.2                     "/tini -- milvus run…"   standalone   25 hours ago   Up 25 hours (healthy)   0.0.0.0:9091->9091/tcp, :::9091->9091/tcp, 0.0.0.0:19530->19530/tcp, :::19530->19530/tcp

注:使用docker-compose命令执行时,一定要在和yml文件同级目录下执行,否则执行时会报出以下错误:

[root@Centos7 app]# docker-compose ps

no configuration file provided: not found

data-report-view="{"mod":"1585297308_001","spm":"1001.2101.3001.6548","dest":"https://blog.csdn.net/myself88129/article/details/134163761","extend1":"pc","ab":"new"}">>
注:本文转载自blog.csdn.net的十尾仙狸的文章"https://blog.csdn.net/qq_42675140/article/details/127349890"。版权归原作者所有,此博客不拥有其著作权,亦不承担相应法律责任。如有侵权,请联系我们删除。
复制链接

评论记录:

未查询到任何数据!