以图搜图 一:使用podman docker部署vearch

1:windows 安装podman desktop

登录podman官网下载podman deskptop安装程序,进行安装。

安装完成后,在podman desktop上面完成 podman 的setup设置

2:podman machine init

初始化完成之后,使用wsl命令查看

3:设置国内镜像

使用 podman machine ssh 登录到虚拟机

sudo vi /etc/containers/registries.conf

unqualified-search-registries = ["j5hlnxkk.mirror.aliyuncs.com","docker.mirrors.ustc.edu.cn","hub-mirror.c.163.com","registry.fedoraproject.org", "registry.access.redhat.com", "docker.io", "quay.io"]

[[docker.io]]
location = "docker.mirrors.ustc.edu.cn/"
[[docker.io]]
location = "j5hlnxkk.mirror.aliyuncs.com"
[[docker.io]]
location = "registry.cn-hangzhou.aliyuncs.com"
insecure = true

short-name-mode="enforcing"

4: 下载vearch镜像

docker pull vearch/vearch:latest

5:在虚拟机内新建veach的配置文件

sudo mkdir -p /home/vearch/

cd /home/vearch/

vi config.toml

文件内容为注意端口要和启动容器时端口映射的一致:

[global]

    # the name will validate join cluster by same name
    name = "vearch"
    # you data save to disk path ,If you are in a production environment, You'd better set absolute paths
    data = ["/home/vearch/Data/baud/datas/"]
    # log path , If you are in a production environment, You'd better set absolute paths
    log = "/home/vearch/Data/baud/logs/"
    # default log type for any model
    level = "debug"
    # master <-> ps <-> router will use this key to send or receive data
    signkey = "vearch"
    skip_auth = true

# if you are master you'd better set all config for router and ps and router and ps use default config it so cool
[[masters]]
    # name machine name for cluster
    name = "master1"
    # ip or domain
    address = "127.0.0.1"
    # api port for http server
    api_port = 8818
    # port for etcd server
    etcd_port = 2378
    # listen_peer_urls List of comma separated URLs to listen on for peer traffic.
    # advertise_peer_urls List of this member's peer URLs to advertise to the rest of the cluster. The URLs needed to be a comma-separated list.
    etcd_peer_port = 2390
    # List of this member's client URLs to advertise to the public.
    # The URLs needed to be a comma-separated list.
    # advertise_client_urls AND listen_client_urls
    etcd_client_port = 2370
    skip_auth = true

[router]
    # port for server
    port = 9002
    # skip auth for client visit data
    skip_auth = true

[ps]
    # port for server
    rpc_port = 8081
    # raft config begin
    raft_heartbeat_port = 8898
    raft_replicate_port = 8899
    heartbeat-interval = 200 #ms
    raft_retain_logs = 10000
    raft_replica_concurrency = 1
    raft_snap_concurrency = 1

6:启动vearch镜像

注意不要使用sudo, 虚拟机端口:容器内端口映射。

7:使用命令创建表验证:

curl -XPUT -H "content-type:application/json" -d '{"name": "test"}' http://127.0.0.1:8821/db/_create

  • 20
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值