Try adding this to the requirements file. It worked for me.
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.11.0+cpu
torchvision==0.12.0+cpu
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello!
I have a python web app on Azure.
How can I install torch with requirements.txt?
With the Web SSH, it always restarts.
Try adding this to the requirements file. It worked for me.
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.11.0+cpu
torchvision==0.12.0+cpu
Hi @SuperMX ,
When you deploy your Python app, Azure App Service will create a virtual environment to and run pip install -r requirements.txt
. If you don't see this happening, make sure SCM_DO_BUILD_DURING_DEPLOYMENT
is set to 1
. See https://learn.microsoft.com/en-us/azure/app-service/configure-language-python for more details. If you're seeing errors during app startup, please comment down below.