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

Python (Dash) web app deployment on Azure with pipeline running too long with message Building wheel for pandas still running. How to optimize?

  • Thread starter Thread starter Jason Susanto
  • Start date Start date
J

Jason Susanto

Guest
I have a Python web app (Dash) with the following requirements.txt:

Code:
dash==2.17.0
numpy==1.26.4
pandas==1.5.3
dash-mantine-components==0.14.3
python-dotenv==1.0.1
dash-iconify==0.1.2
dash-bootstrap-components==1.6.0
pyspark==3.5.1
pytz==2024.1
package @ git+https://${GITHUB_TOKEN}:[email protected]/package
...

and within this package, this is the pipfile:

Code:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pandas = "==1.5.3"
pyspark = "==3.5.1"
... other dependencies

[dev-packages]

[requires]
python_version = "3.9"

And on Azure App Service, this is the configuration: Python stack with Python version 3.12.

But when I run my pipeline on Azure DevOps to build and deploy my web app, it is taking at least 20 minutes for each stage. Primarily with this step taking so long (at least around 10-12 mins):

Code:
  Building wheel for pandas (pyproject.toml): started
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...
  Building wheel for pandas (pyproject.toml): still running...

Lastly, this is the code I used to install python dependencies in my build&deploy.yml file:

Code:
- script: |
        python -m venv antenv
        source antenv/bin/activate
        python -m pip install --upgrade pip
        pip install setup
        pip install --target="./.python_packages/lib/site-packages" -r ./requirements.txt
      displayName: 'Install Python dependencies'

Furthermore, the build&deploy uses python version 3.12, versionSpec: '3.12'

Is there a way to optimize this Python app deployment on Azure with Azure DevOps pipeline? Am I doing something wrong in terms of versioning and compatibility?
<p>I have a Python web app (Dash) with the following requirements.txt:</p>
<pre><code>dash==2.17.0
numpy==1.26.4
pandas==1.5.3
dash-mantine-components==0.14.3
python-dotenv==1.0.1
dash-iconify==0.1.2
dash-bootstrap-components==1.6.0
pyspark==3.5.1
pytz==2024.1
package @ git+https://${GITHUB_TOKEN}:[email protected]/package
...
</code></pre>
<p>and within this package, this is the pipfile:</p>
<pre><code>[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pandas = "==1.5.3"
pyspark = "==3.5.1"
... other dependencies

[dev-packages]

[requires]
python_version = "3.9"
</code></pre>
<p>And on Azure App Service, this is the configuration: Python stack with Python version 3.12.</p>
<p>But when I run my pipeline on Azure DevOps to build and deploy my web app, it is taking at least 20 minutes for each stage. Primarily with this step taking so long (at least around 10-12 mins):</p>
<pre><code> Building wheel for pandas (pyproject.toml): started
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
Building wheel for pandas (pyproject.toml): still running...
</code></pre>
<p>Lastly, this is the code I used to install python dependencies in my build&deploy.yml file:</p>
<pre><code>- script: |
python -m venv antenv
source antenv/bin/activate
python -m pip install --upgrade pip
pip install setup
pip install --target="./.python_packages/lib/site-packages" -r ./requirements.txt
displayName: 'Install Python dependencies'
</code></pre>
<p>Furthermore, the build&deploy uses python version 3.12, versionSpec: '3.12'</p>
<p>Is there a way to optimize this Python app deployment on Azure with Azure DevOps pipeline? Am I doing something wrong in terms of versioning and compatibility?</p>
Continue reading...
 

Latest posts

ن
Replies
0
Views
1
نعمان منذر محمود الجميلي
ن
S
Replies
0
Views
1
Sikandra
S
Top