Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomconte/batch-nvidia-images
Generate Azure VM Images with Packer for use with Azure Batch; NVIDIA CUDA + GRID + Docker
https://github.com/tomconte/batch-nvidia-images
Last synced: 12 days ago
JSON representation
Generate Azure VM Images with Packer for use with Azure Batch; NVIDIA CUDA + GRID + Docker
- Host: GitHub
- URL: https://github.com/tomconte/batch-nvidia-images
- Owner: tomconte
- License: mit
- Created: 2019-09-26T11:56:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-07T09:47:26.000Z (about 5 years ago)
- Last Synced: 2024-10-26T09:47:49.590Z (25 days ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Packer configuration for NVIDIA + Docker custom images on Azure
This is a Packer configuration that can be used to generate custom managed Azure VM images:
- CentOS-HPC (7.4) or standard Ubuntu (18.04)
- NVIDIA GRID drivers on NV* hosts
- CUDA Toolkit
- Docker CEThese images are designed to be used in Azure Batch container-enabled pools, in order to run container-based batch jobs that require access to a GPU: either via CUDA or the NVIDIA GRID driver on suitable machine types (e.g. NV*).
To use the Packer configuration, set the environment variables containing Service Principal credentials with subscription-level :
```
export ARM_CLIENT_ID=
export ARM_CLIENT_SECRET=
export ARM_TENANT_ID=
export ARM_SUBSCRIPTION_ID=
```Create a Resource Group where the Managed Image will be created, e.g.:
```
az group create -n centos-hpc-nvidia -l westeurope
```or:
```
az group create -n ubuntu-nvidia -l westeurope
```Then run:
```
packer build centos-hpc-nvidia.json
```or:
```
packer build ubuntu-nvidia.json
```Give the image a quick test:
```
az vm create -n nvidia-smoke-test -g centos-hpc-nvidia --image centos-hpc-nvidia --size Standard_NV6_Promo --ssh-key-value ~/.ssh/id_rsa.pub
```or:
```
az vm create -n ubuntu-smoke-test -g ubuntu-nvidia --image ubuntu-nvidia --size Standard_NV6_Promo --ssh-key-value ~/.ssh/id_rsa.pub
```## Using the images with Azure Batch
Nota bene: in order to use a custom image in a Batch pool, it is recommended to use the Shared Image Gallery service. The article below, from the Batch Shipyard project documentation, gives some indications on how to do this.
[Creating Images for use with Azure Batch and Batch Shipyard](https://batch-shipyard.readthedocs.io/en/latest/63-batch-shipyard-custom-images/#creating-images-for-use-with-azure-batch-and-batch-shipyard)