Commit 61df46cb by tingweiwang

fix gpu 判断

1 parent 624945c1
Showing with 2 additions and 2 deletions
......@@ -201,8 +201,8 @@ ansible master -m copy -a "src=/lib/systemd/system/flanneld.service dest=/lib/sy
ansible master -m shell -a "systemctl daemon-reload && service flanneld restart && service flanneld status && systemctl enable flanneld.service"
###################################根据不同节点类型,安装设置docker#####################################
echo "判断当前节点是gpu,还是cpu节点,根据节点不同,完成不同操作&& sleep 2"
test=`lspci |grep -i nvidia`
if [ $test -ep 0 ];then
test=`lspci |grep -i nvidia|wc -l`
if [ $test -gt 0 ];then
echo "当前节点是GPU节点,开始安装gpu docker" && sleep 2 && apt install nvidia-docker2 --allow-unauthenticated -y
echo "当前harbor仓库地址为$harbor_host"
sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json_gpu
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!