Azure Batch Container Per Task RRS feed

  • Question

  • I have my code working such that it is creating a pool using:

    new ImageReference("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter-with-Containers", version: "latest");   

    VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(                    imageReference: imageReference,                    nodeAgentSkuId: "batch.node.windows amd64");

    My task is using a docker image that is stored in Azure Container Registry. All of this is working fine, I can see a container get created and execute and output my files.

    I thought though that the pool node would keep adding containers to process the tasks, but I only ever see one container get created and it works through the tasks. Is it possible to have it create multiple containers? 

    Is that what this request is asking for as well?


    Am I going to have to use the Batch-Shipyard instead to accomplish this?


    Monday, April 23, 2018 3:36 PM

All replies

  • Ok, I just found the setting that makes this work how I want! 

    pool.MaxTasksPerComputeNode = 4;      

    That is creating 4 containers on the node for me.

    Monday, April 23, 2018 4:27 PM
  • Hi Ben,

    This is correct way to let single node to run multiple regular tasks/container tasks at same time. However, if you using same container image for the task, it would be better performance to specify the container image in pool settings. So the container will be downloaded when Compute Node join the pool.


    Thursday, May 10, 2018 6:40 PM