question

AmroGhoneim-1570 avatar image
0 Votes"
AmroGhoneim-1570 asked AmroGhoneim-1570 answered

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

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-instancesazure-container-registry
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AmroGhoneim-1570 , Thank you for your question.

It seems like your issue is very similar to this currently open GitHub issue. You might want to follow this issue.
In the meanwhile, we are internally investigating, and will keep sharing more updates with you.

1 Vote 1 ·
AmroGhoneim-1570 avatar image
0 Votes"
AmroGhoneim-1570 answered

I found a solution to this problem!

Please check this link


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

learn2skills avatar image
0 Votes"
learn2skills answered AmroGhoneim-1570 commented

Hi @AmroGhoneim-1570

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
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-gpu



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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So I did create an azure container instance with gpu capabilities but the logs show that it doesn't detect the gpus and that pytorch is defaulting to CPU instead. Do I need to configure the Dockerfile itself to build a gpu container or what might be the problem here?

0 Votes 0 ·