Skip to content

Commit 997fed1

Browse files
Merge pull request #263719 from alfpark/alpark/batch9
Update Batch container doc
2 parents 3c6fcda + a7bffe3 commit 997fed1

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

articles/batch/batch-docker-container-workloads.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Container workloads on Azure Batch
33
description: Learn how to run and scale apps from container images on Azure Batch. Create a pool of compute nodes that support running container tasks.
44
ms.topic: how-to
5-
ms.date: 01/10/2024
5+
ms.date: 01/19/2024
66
ms.devlang: csharp
77
# ms.devlang: csharp, python
88
ms.custom: seodec18, devx-track-csharp, linux-related-content
@@ -63,40 +63,37 @@ a `DockerCompatible` capability if the image supports Docker containers. Batch a
6363
support, images published by Mirantis with capability noted as `DockerCompatible`. These images may only be
6464
deployed under a User Subscription pool allocation mode Batch account.
6565

66-
You can also create custom images from VMs running Docker on Windows.
66+
You can also create a [custom image](batch-sig-images.md) to enable container functionality on Windows.
6767

6868
> [!NOTE]
6969
> The image SKUs `-with-containers` or `-with-containers-smalldisk` are retired. Please see the [announcement](https://techcommunity.microsoft.com/t5/containers/updates-to-the-windows-container-runtime-support/ba-p/2788799) for details and alternative container runtime options.
7070
7171
### Linux support
7272

73-
For Linux container workloads, Batch currently supports the following Linux images published by Microsoft Azure Batch in the Azure Marketplace without the need for a custom image.
74-
75-
#### VM sizes without RDMA
76-
77-
- Publisher: `microsoft-azure-batch`
78-
- Offer: `centos-container`
79-
- Offer: `ubuntu-server-container`
73+
For Linux container workloads, Batch currently supports the following Linux images published in the Azure Marketplace
74+
without the need for a custom image.
8075

8176
- Publisher: `microsoft-dsvm`
8277
- Offer: `ubuntu-hpc`
8378

84-
#### VM sizes with RDMA
79+
#### Alternate image options
8580

86-
- Publisher: `microsoft-azure-batch`
87-
- Offer: `centos-container-rdma`
88-
- Offer: `ubuntu-server-container-rdma`
81+
Currently there are other images published by `microsoft-azure-batch` that support container workloads:
8982

90-
- Publisher: `microsoft-dsvm`
91-
- Offer: `ubuntu-hpc`
83+
- Publisher: `microsoft-azure-batch`
84+
- Offer: `centos-container`
85+
- Offer: `centos-container-rdma` (For use exclusively on VM SKUs with Infiniband)
86+
- Offer: `ubuntu-server-container`
87+
- Offer: `ubuntu-server-container-rdma` (For use exclusively on VM SKUs with Infiniband)
9288

9389
> [!IMPORTANT]
94-
> It is recommended to use the `microsoft-dsvm` `ubuntu-hpc` VM image if possible.
90+
> It is recommended to use the `microsoft-dsvm` `ubuntu-hpc` VM image instead of images published by
91+
> `microsoft-azure-batch`. This image may be used on any VM SKU.
9592
9693
#### Notes
9794
The docker data root of the above images lies in different places:
9895
- For the Azure Batch published `microsoft-azure-batch` images (Offer: `centos-container-rdma`, etc.), the docker data root is mapped to _/mnt/batch/docker_, which is located on the temporary disk.
99-
- For the HPC image, or `microsoft-dsvm` (Offer: `ubuntu-hpc`, etc.), the docker data root is unchanged from the Docker default which is _/var/lib/docker_ on Linux and _C:\ProgramData\Docker_ on Windows. These folders are located on the OS disk.
96+
- For the HPC image, or `microsoft-dsvm` (Offer: `ubuntu-hpc`, etc.), the docker data root is unchanged from the Docker default, which is _/var/lib/docker_ on Linux and _C:\ProgramData\Docker_ on Windows. These folders are located on the OS disk.
10097

10198
For non-Batch published images, the OS disk has the potential risk of being filled up quickly as container images are downloaded.
10299

@@ -122,14 +119,21 @@ These images are only supported for use in Azure Batch pools and are geared for
122119
- Pre-installed NVIDIA GPU drivers and NVIDIA container runtime, to streamline deployment on Azure N-series VMs.
123120
- VM images with the suffix of `-rdma` are pre-configured with support for InfiniBand RDMA VM sizes. These VM images shouldn't be used with VM sizes that don't have InfiniBand support.
124121

125-
You can also create custom images from VMs running Docker on one of the Linux distributions that's compatible with Batch. If you choose to provide your own custom Linux image, see the instructions in [Use a managed image to create a custom image pool](batch-custom-images.md).
122+
You can also create [custom images](batch-sig-images.md) compatible for Batch containers on one of the Linux distributions
123+
that's compatible with Batch. For Docker support on a custom image, install a suitable Docker-compatible runtime, such as
124+
a version of [Docker](https://www.docker.com) or
125+
[Mirantis Container Runtime](https://www.mirantis.com/software/mirantis-container-runtime/). Installing just
126+
a Docker-CLI compatible tool is insufficient; a Docker Engine compatible runtime is required.
126127

127-
For Docker support on a custom image, install [Docker Pro](https://www.docker.com/products/pro/) or the open-source [Docker Community Edition](https://www.docker.com/community).
128+
> [!IMPORTANT]
129+
> Neither Microsoft or Azure Batch will provide support for issues related to Docker (any version or edition),
130+
> Mirantis Container Runtime, or Moby runtimes. Customers electing to use these runtimes in their images should reach
131+
> out to the company or entity providing support for runtime issues.
128132
129-
Additional considerations for using a custom Linux image:
133+
More considerations for using a custom Linux image:
130134

131135
- To take advantage of the GPU performance of Azure N-series sizes when using a custom image, pre-install NVIDIA drivers. Also, you need to install the Docker Engine Utility for NVIDIA GPUs, [NVIDIA Docker](https://github.com/NVIDIA/nvidia-docker).
132-
- To access the Azure RDMA network, use an RDMA-capable VM size. Necessary RDMA drivers are installed in the CentOS HPC and Ubuntu images supported by Batch. Additional configuration may be needed to run MPI workloads. See [Use RDMA or GPU instances in Batch pool](batch-pool-compute-intensive-sizes.md).
136+
- To access the Azure RDMA network, use an RDMA-capable VM size. Necessary RDMA drivers are installed in the CentOS HPC and Ubuntu images supported by Batch. Extra configuration may be needed to run MPI workloads. See [Use RDMA or GPU instances in Batch pool](batch-pool-compute-intensive-sizes.md).
133137

134138
## Container configuration for Batch pool
135139

@@ -363,7 +367,7 @@ CloudPool pool = batchClient.PoolOperations.CreatePool(
363367

364368
To run a container task on a container-enabled pool, specify container-specific settings. Settings include the image to use, registry, and container run options.
365369

366-
- Use the `ContainerSettings` property of the task classes to configure container-specific settings. These settings are defined by the [TaskContainerSettings](/dotnet/api/microsoft.azure.batch.taskcontainersettings) class. The `--rm` container option doesn't require an additional `--runtime` option since it's taken care of by Batch.
370+
- Use the `ContainerSettings` property of the task classes to configure container-specific settings. These settings are defined by the [TaskContainerSettings](/dotnet/api/microsoft.azure.batch.taskcontainersettings) class. The `--rm` container option doesn't require another `--runtime` option since it's taken care of by Batch.
367371

368372
- If you run tasks on container images, the [cloud task](/dotnet/api/microsoft.azure.batch.cloudtask) and [job manager task](/dotnet/api/microsoft.azure.batch.cloudjob.jobmanagertask) require container settings. However, the [start task](/dotnet/api/microsoft.azure.batch.starttask), [job preparation task](/dotnet/api/microsoft.azure.batch.cloudjob.jobpreparationtask), and [job release task](/dotnet/api/microsoft.azure.batch.cloudjob.jobreleasetask) don't require container settings (that is, they can run within a container context or directly on the node).
369373

@@ -385,7 +389,7 @@ If the container image for a Batch task is configured with an [ENTRYPOINT](https
385389

386390
- If the image doesn't have an ENTRYPOINT, set a command line appropriate for the container, for example, `/app/myapp` or `/bin/sh -c python myscript.py`
387391

388-
Optional [ContainerRunOptions](/dotnet/api/microsoft.azure.batch.taskcontainersettings.containerrunoptions) are additional arguments you provide to the `docker create` command that Batch uses to create and run the container. For example, to set a working directory for the container, set the `--workdir <directory>` option. See the [docker create](https://docs.docker.com/engine/reference/commandline/create/) reference for additional options.
392+
Optional [ContainerRunOptions](/dotnet/api/microsoft.azure.batch.taskcontainersettings.containerrunoptions) are other arguments you provide to the `docker create` command that Batch uses to create and run the container. For example, to set a working directory for the container, set the `--workdir <directory>` option. See the [docker create](https://docs.docker.com/engine/reference/commandline/create/) reference for more options.
389393

390394
### Container task working directory
391395

0 commit comments

Comments
 (0)