Azure Batch 算子

AzureBatchOperator

使用 AzureBatchOperator 在 Azure Batch 上触发任务

以下是使用此算子在 Azure Batch 上触发任务的示例

tests/system/providers/microsoft/azure/example_azure_batch_operator.py[源代码]

    azure_batch_operator = AzureBatchOperator(
        task_id="azure_batch",
        batch_pool_id=POOL_ID,
        batch_pool_vm_size="standard_d2s_v3",
        batch_job_id="example-job",
        batch_task_command_line="/bin/bash -c 'set -e; set -o pipefail; echo hello world!; wait'",
        batch_task_id="example-task",
        vm_node_agent_sku_id="batch.node.ubuntu 22.04",
        vm_publisher="Canonical",
        vm_offer="0001-com-ubuntu-server-jammy",
        vm_sku="22_04-lts-gen2",
        target_dedicated_nodes=1,
    )

参考

有关更多信息,请参阅

此条目有帮助吗?