docker pull weaviate 国内拉取失败的问题

我是校内网,尝试了

改镜像源

(cooragent) ruiy@CJQ:~/sdb/B/cooragent$ sudo vim /etc/docker/daemon.json 
[sudo] password for ruiy: 
(cooragent) ruiy@CJQ:~/sdb/B/cooragent$ sudo service docker restart
(cooragent) ruiy@CJQ:~/sdb/B/cooragent$ sudo docker info 

 Registry Mirrors:
  https://registry.docker-cn.com/
  http://hub-mirror.c.163.com/
  https://docker.mirrors.ustc.edu.cn/
  https://kfwkfulq.mirror.aliyuncs.com/
 Live Restore Enabled: false

 但是对于拉去 weaviate 没用,

weaviate 向量库有个图存储想试试效果

尝试多次无果

chatgpt建议通过下载 本地安装,

但是没找到 weaviate 的docker 镜像

解决方法

最后终于找到这个镜像拉去成功

wdocker.io/semitechnologies/weaviate 项目中国可用镜像列表 | 高速可靠的 Docker 镜像资源

拉去命令

docker pull      swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/semitechnologies/weaviate:1.31.0

官网 docker配置

1.1 Create a Weaviate database

Save the following code to a file named docker-compose.yml in your project directory.

image 修改成上面给的

#volumes 是你想存储的卷地址 

#PERSISTENCE_DATA_PATH 持久数据地址   这两个地址按照需求修改好

---
services:
  weaviate:
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: cr.weaviate.io/semitechnologies/weaviate:1.32.0
    ports:
    - 8080:8080
    - 50051:50051
    volumes:
    - weaviate_data:/var/lib/weaviate
    restart: on-failure:0
    environment:
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      ENABLE_API_BASED_MODULES: 'true'
      ENABLE_MODULES: 'text2vec-ollama,generative-ollama'
      CLUSTER_HOSTNAME: 'node1'
volumes:
  weaviate_data:
...

Run the following command to start a Weaviate instance using Docker:

docker-compose up -d

1.2 Install a client library

We recommend using a client library to work with Weaviate. Follow the instructions below to install one of the official client libraries, available in PythonJavaScript/TypeScriptGo, and Java.

  • Python

Install the latest, Python client v4, by adding weaviate-client to your Python environment with pip:

pip install -U weaviate-client

1.3: Connect to Weaviate

Now you can connect to your Weaviate instance.

The example below shows how to connect to Weaviate and perform a basic operation, like checking the cluster status.

  • Python

quickstart_check_readiness.py

import weaviate

client = weaviate.connect_to_local()

print(client.is_ready())  # Should print: `True`

client.close()  # Free up resources

python 运行有个true 就连上了,

​编辑  API docs

If you did not see any errors, you are ready to proceed. We will replace the simple cluster status check with more meaningful operations in the next steps.

接下来熟悉操作

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值