我是校內網,嘗試了
改鏡像源
(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- httpimage: cr.weaviate.io/semitechnologies/weaviate:1.32.0ports:- 8080:8080- 50051:50051volumes:- weaviate_data:/var/lib/weaviaterestart: on-failure:0environment:QUERY_DEFAULTS_LIMIT: 25AUTHENTICATION_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?Python,?JavaScript/TypeScript,?Go, 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 weaviateclient = 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.
接下來熟悉操作