OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Deployment of Python Azure Function extremely slow

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Guest
Deploying my Python Azure Function to a Function app takes a painful amount of time (sometimes >25 minutes).

The project only consists of 2 timer-trigger functions and the requirements.txt has the following entries:

Code:
azure-functions
pyodbc
sqlalchemy
numpy==1.26.4
pandas
-f https://download.pytorch.org/whl/torch_stable.html
torch==2.2.0+cpu
darts

From what I can see, the most time is spent on deleting the old .python directory, (re-)installing all pip packages and then copying to the destination directory /home/site/wwwroot.

Is there a way to cache the installed packages, so I don't have to redeploy everything if I just make slight changes to the code? Are there other ways to speed up the process?
<p>Deploying my Python Azure Function to a Function app takes a painful amount of time (sometimes >25 minutes).</p>
<p>The project only consists of 2 timer-trigger functions and the requirements.txt has the following entries:</p>
<pre><code>azure-functions
pyodbc
sqlalchemy
numpy==1.26.4
pandas
-f https://download.pytorch.org/whl/torch_stable.html
torch==2.2.0+cpu
darts
</code></pre>
<p>From what I can see, the most time is spent on deleting the old .python directory, (re-)installing all pip packages and then copying to the destination directory <em>/home/site/wwwroot</em>.</p>
<p>Is there a way to cache the installed packages, so I don't have to redeploy everything if I just make slight changes to the code? Are there other ways to speed up the process?</p>
 

Latest posts

Top