Tips for Reducing Plotly package size

I’m trying to deploy a Dash app to lambda and have hit a road-block of the bundled zip of my app being too large. Looking at the dependencies of my app, the biggest contributor of disk-space footprint is Plotly, coming in at ~125MB.

Are there any known strategies for slimming down the Python plotly package size?

I see that the main contributors to the size on disk are the validators and graph_obj:

du -s lib/python3.8/site-packages/plotly/* | sort -rsh | head -10
79M     lib/python3.8/site-packages/plotly/validators
41M     lib/python3.8/site-packages/plotly/graph_objs
3.5M    lib/python3.8/site-packages/plotly/package_data
672K    lib/python3.8/site-packages/plotly/figure_factory
340K    lib/python3.8/site-packages/plotly/express
328K    lib/python3.8/site-packages/plotly/io
316K    lib/python3.8/site-packages/plotly/__pycache__
280K    lib/python3.8/site-packages/plotly/matplotlylib
188K    lib/python3.8/site-packages/plotly/basedatatypes.py
84K     lib/python3.8/site-packages/plotly/offline
1 Like

did u find any solution to this? Im facing same issues