自学Microsoft提供的AutonomousDrivingCookbook
代码取自GitHub:https://github.com/microsoft/AutonomousDrivingCookbook
在进行Step 0 - Set up the Cluster中,需安装Azure powershell,
从GitHub下载powershell7.13版本后https://github.com/PowerShell/PowerShell/releases/tag/v7.1.3
并按照Microsoft的文档安装powershellget及Azure module
powershellget:https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.2
Azure module:https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-7.1.0
运行时返回值为:64
相关代码
以下为这一个block的注释:
We have a custom image that has the proper drivers installed to run AirSim. To create this image, we will run a powershell script that will copy the image from our storage account to your storage account. Ensure that you have the latest version of the AzCopy utility installed and in your path (i.e. running 'azcopy' at the command line should yield the help page). In addition, ensure that you have the latest version of Azure Powershell installed. This command can take up to an hour to run.
我们有一个自定义图像,有适当的驱动程序安装运行AirSim。要创建这个映像,我们将运行一个powershell脚本,该脚本将把映像从我们的存储帐户复制到您的存储帐户。确保你有最新版本的AzCopy实用程序安装在你的路径(即在命令行运行' AzCopy '应该会产生帮助页面)。此外,请确保安装了最新版本的Azure Powershell。运行该命令可能需要一个小时。
os.system('F:\\AutonomousDrivingCookbook-master\\powershell7-13\\A.exe ".\\CreateImage.ps1 -subscriptionId {0} -storageAccountName {1} -storageAccountKey {2} -resourceGroupName {3}'\
.format(NOTEBOOK_CONFIG['subscription_id'], NOTEBOOK_CONFIG['storage_account_name'], NOTEBOOK_CONFIG['storage_account_key'], NOTEBOOK_CONFIG['resource_group_name']))
F:\AutonomousDrivingCookbook-master\powershell7-13\A.exe是我存放的powershell的路径和名称
以下是GitHub下载后此部分的原始代码:
os.system('powershell.exe ".\\CreateImage.ps1 -subscriptionId {0} -storageAccountName {1} -storageAccountKey {2} -resourceGroupName {3}'\
.format(NOTEBOOK_CONFIG['subscription_id'], NOTEBOOK_CONFIG['storage_account_name'], NOTEBOOK_CONFIG['storage_account_key'], NOTEBOOK_CONFIG['resource_group_name']))
运行结果及报错内容
运行结果如下:
另外寻求实操过此GitHub代码的朋友
https://github.com/microsoft/AutonomousDrivingCookbook