# 问题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