Qanything 部署的三个拦路虎问题及相应解决方案。

# 问题1
 

The Compose file './docker-compose-linux.yaml' is invalid because:

services.qanything_local.deploy.resources.reservations value Additional properties are not allowed ('devices' was unexpected)

ERROR: The Compose file './docker-compose-linux.yaml' is invalid because:

services.qanything_local.deploy.resources.reservations value Additional properties are not allowed ('devices' was unexpected)

ERROR: The Compose file './docker-compose-linux.yaml' is invalid because:

services.qanything_local.deploy.resources.reservations value Additional properties are not allowed ('devices' was unexpected)

这个报错知道是什么原因吗?

我只能注释掉这个配置的部分,但是又不知道这个要怎么处理。

这个问题是因为docker-compose 的版本问题,升级版本到2.23以上就可以解决。

centos 自带 是1.x的

yum install docker-compose 的版本太低,需要升级版本

# 问题2

Error response from daemon: could not select device driver "nvidia" with capabilities: [[gpu]]

[root@localhost QAnything]# nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2023 NVIDIA Corporation

Built on Tue_Aug_15_22:02:13_PDT_2023

Cuda compilation tools, release 12.2, V12.2.140

Build cuda_12.2.r12.2/compiler.33191640_0@jacinli 

通过安装

安装 nvidia-container-toolkit

解决

参考文档

https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html

Installing with Yum or Dnf

Configure the production repository:

curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \

  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

Optionally, configure the repository to use experimental packages:

sudo yum-config-manager --enable nvidia-container-toolkit-experimental

Install the NVIDIA Container Toolkit packages:

sudo yum install -y nvidia-container-toolkit

# 问题3

Qanything 启动时 

[2024-04-10 12:01:16 +0800] [1733] [ERROR] 1040 (HY000): Too many connections

重新启动提示这个了

由于mysql的连接数小了,需要调大,

修改docker-compose.yml文件

  mysql:

    container_name: mysql-container-local

    privileged: true

    image: mysql

    #     ports:

    #       - "3306:3306"

    command: --max-connections=10000

    environment:

      - MYSQL_ROOT_PASSWORD=123456

    volumes:

      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/mysql:/var/lib/mysql

改一下这里,改成100还不够,我直接加到10000才行

    command: --max-connections=10000



 

command: --max-connections=10000

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值