运行docker
docker run -dit --restart=always --privileged=true -v /yourpath:/yourpath --name=qubic --gpus all -m 32G --cpus 18 -p 0.0.0.0:8133:88 centos /usr/sbin/init
docker exec -it {container id} /bin/bash
进入docker配置
#安装运行支持库
yum install libicu-devel
#下载qubic官方脚本
wget -O qli-Service-install.sh https://dl.qubic.li/cloud-init/qli-Service-install.sh
#授予脚本执行权限
chmod u+x qli-Service-install.sh
#执行服务创建命令,需要更换accessToken为自己的
./qli-Service-install.sh 1 {accessToken}
#查看unit
cd /etc/systemd/system/qli.service
#查看安装的服务
cd /q && ls
#使用CUDA GPU
vi /q/appsettings.json
在json配置文件中新增以下字段与值:
"allowHwInfoCollect": true,"overwrites": {"CUDA":"12"},
结构如下:
{"Settings":{"baseUrl": "https://mine.qubic.li/","amountOfThreads": 1,"allowHwInfoCollect": true,"overwrites": {"CUDA":"12"},"alias": "",
"accessToken": "{accessToken}", "autoupdateEnabled": false}}
启用qli服务
systemctl enable qli
systemctl start qli