重新启动cloud-init bash脚本后的登录提示+如何创建低优先级的VM计算机 [英] Login prompt after cloud-init bash script reboot + How to create low priority VM machines

查看:79
本文介绍了重新启动cloud-init bash脚本后的登录提示+如何创建低优先级的VM计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让我的leela-zero指令适用于Microsoft Azure

这是我在cloud-init中使用的脚本:

基本上,它的工作是在第一次启动时安装所有必需的软件包,然后在第二次启动时运行./autogtp(零利拉贡献工具)

它可以完美地与Google Cloud一起使用,但是在Azure上,重新启动后我得到了ssh登录提示:


https://imgur.com/a/cojQF9o

我正在使用由tytygen在vm机器创建期间通过nc-v2实例生成的ssh公钥

此登录提示使我的脚本无法完成(运行./autogtp)

解决第一个问题后

顺便说一下,我还有很多其他问题,包括: 

2)如何创建低优先级虚拟机,如此处所述:

https://azure.microsoft.com/zh-CN/blog/low-priority-scale-sets/

无论我在哪里查看,我都无法在VM计算机创建或实例模板中找到此选项

3)如何在低优先级的Azure上使用等效的Google Cloud托管实例组? (该组将在所有具有nc-v2硬件可用的区域中自动创建并启动vm计算机,然后在被抢占时将其删除)

非常感谢您的帮助,因为我非常想让它成功运行

4)cloud-init中的工作脚本将没有时间限制地运行吗? (这是实现零零利箱的一种工具)

解决方案

有人有建议吗?


Hi,

I'm trying to get my leela-zero instructions work for Microsoft Azure

this is the script i'm using in cloud-init : 

#!/bin/bash
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' glances|grep "install ok installed")
echo Checking for glanceslib: $PKG_OK
if [ "" == "$PKG_OK" ]; then
  echo "No glanceslib. Setting up glanceslib and all other leela-zero packages."
  sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo add-apt-repository -y ppa:graphics-drivers/ppa && sudo apt-get update && sudo apt-get -y install nvidia-driver-410 linux-headers-generic nvidia-opencl-dev && sudo apt-get -y install clinfo cmake git libboost-all-dev libopenblas-dev zlib1g-dev build-essential qtbase5-dev qttools5-dev qttools5-dev-tools libboost-dev libboost-program-options-dev opencl-headers ocl-icd-libopencl1 ocl-icd-opencl-dev qt5-default qt5-qmake curl && git clone https://github.com/gcp/leela-zero && cd leela-zero && git submodule update --init --recursive && mkdir build && cd build && cmake .. && cmake --build . && cd ../autogtp && cp ../build/autogtp/autogtp . && cp ../build/leelaz . && sudo apt-get -y install glances zip && sudo apt-get clean && sudo reboot
else 
  sudo -i && cd /leela-zero/autogtp && ./autogtp -g 2
fi

Basically what it does is install all needed packages at first boot, then run ./autogtp at second boot (leela-zero contributing tool)

It works flawlessly with google cloud, but on azure i got this ssh login prompt after reboot : 


https://imgur.com/a/cojQF9o

I'm using ssh public key generated by puttygen during vm machine creation, with a nc-v2 instance

This login prompt makes my script stuck unable to complete (run ./autogtp)

After this first issue is solved,

I have many other questions by the way, including : 

2) how can you create low priority VMs as stated here : 

https://azure.microsoft.com/en-us/blog/low-priority-scale-sets/

i couldnt find this option in VM machine creation or instance templates no matter where i looked

3) how can you use the equivalent of managed instance groups of google cloud here on azure with low priority ? (the group will automatically create and start vm machines in all regions that have an nc-v2 hardware available, then delete it when it is preempted)

Big thanks for any help, as i'm getting quite desperate of making it run successfully

4) will the working script in cloud-init run with no time limit ? (it is a tool to contribute for leela-zero)

解决方案

anyone has a suggestion ?


这篇关于重新启动cloud-init bash脚本后的登录提示+如何创建低优先级的VM计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆