How to run docker image on GPU enabled azure container instance?

Amro Ghoneim 116 Reputation points

I created a python based web app (using flask and gunicorn) that contains a pytorch based library which can detect if the machine has CUDA GPUs. I added this image to azure container registry then used an azure container instance with GPU capabilities to deploy it. However when checking the logs, it tells me that it was not able to detect GPUs. What am I doing wrong here?

The Dockerfile used doesn't specify anything related to GPUs. is that the main problem?

I created my application on windows but have been using wsl2 with ubuntu linux kernel to create the image.

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
416 questions
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
663 questions
{count} votes

1 additional answer

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 13,996 Reputation points MVP

    Hi @Amro Ghoneim

    To run certain compute-intensive workloads on Azure Container Instances, deploy your container groups with GPU resources. The container instances in the group can access one or more NVIDIA Tesla GPUs while running container workloads such as CUDA and deep learning applications.

    more details

    If the Answer is helpful, please click Accept Answer and up-vote, so that it can help others in the community looking for help on similar topics.