anythingllm、open-webui迁移

anythingllm的恢复数据命令

docker run -d --name anythingllm --add-host=host.docker.internal:host-gateway --env STORAGE_DIR=/app/server/storage --health-cmd "/bin/bash /usr/local/bin/docker-healthcheck.sh || exit 1" --health-interval 60s --health-start-period 60s --health-timeout 10s -p 3001:3001 --restart=always --user anythingllm -v "C:\Users\Administrator\Documents\anythingllm":/app/server/storage -v "C:\Users\Administrator\Documents\anythingllm\.env":/app/server/.env -w /app mintplexlabs/anythingllm

我的docker如果卸载了,如果数据保留,可以直接使用上述运行,可以直接进行账户和内容迁移。

我将数据保存在本机上,这样可以数据持久化,而不是通过docker的容器存储,这样之后卸载docker,还可以把之前的数据保存下来,下次安装docker可以直接使用数据,也可以把数据迁移到其他机器上去。

数据保存到 D:\WSL\data\open-webui文件夹中,命令如下:

docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway --health-cmd "curl -fsSL http://localhost:8080 || exit 1" --health-interval 60s --health-retries 5 --health-timeout 20s --health-start-period 60s --restart=always -v D:\WSL\data\open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:cuda

进行数据恢复,修改一个文件夹,还是这个命令


构建docker-compose.yml文件,自动更新open-webui,全称自动化

version: '3.8'

services:
 open-webui:
   image: ghcr.io/open-webui/open-webui:cuda
   container_name: open-webui
   restart: always
   ports:
     - "3000:8080"
   volumes:
     - ./data:/app/backend/data
   healthcheck:
     test: ["CMD", "curl", "-fsSL", "http://localhost:8080"]
     interval: 60s
     timeout: 20s
     retries: 5
     start_period: 60s
   deploy:
     resources:
       reservations:
         devices:
           - capabilities: [gpu]
   labels:
     - "com.centurylinklabs.watchtower.enable=true"

 watchtower:
   image: containrrr/watchtower
   container_name: watchtower
   restart: unless-stopped
   volumes:
     - /var/run/docker.sock:/var/run/docker.sock
   command: --interval 300 --cleanup --label-enable

评论

此博客中的热门博文

使用自己的github加速源

量化指标计算

申请证书

搭建属于自己的vpn节点—科学上网

wsl安装cuda

解决v2rayN的延迟是-1的问题

wsl虚拟机释放文件

wsl安装cuda10.2

WSL怎么使用本机进行快速克隆github代码