首页 > 解决方案 > 我需要帮助来减少 Python Heroku slug 构建大小

问题描述

我拼命地试图减少heroku上流线型应用程序的大小。

构建渣现在是 525mb,而最大为 500mb。

我的要求是:

altair==4.1.0
argon2-cffi==20.1.0
astor==0.8.1
astroid==2.2.5
async-generator==1.10
attrs==20.2.0
backcall==0.2.0
base58==2.0.1
bleach==3.2.1
blinker==1.4
boto3==1.15.6
botocore==1.18.6
cachetools==4.1.1
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
click==7.1.2
colorama==0.4.1
Counter==1.0.0
cycler==0.10.0
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
enum-compat==0.0.3
idna==2.10
importlib-metadata==2.0.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
isort==4.3.21
jedi==0.17.2
Jinja2==2.11.2
jmespath==0.10.0
joblib==0.14.1
jsonschema==3.2.0
jupyter-client==6.1.7
jupyter-core==4.6.3
jupyterlab-pygments==0.1.1
kiwisolver==1.1.0
lazy-object-proxy==1.4.1
MarkupSafe==1.1.1
matplotlib==3.1.2
mccabe==0.6.1
mistune==0.8.4
nbclient==0.5.0
nbconvert==6.0.6
nbformat==5.0.7
nest-asyncio==1.4.0
numpy==1.18.1
oauthlib==3.1.0
packaging==20.4
pandas==0.25.3
pandocfilters==1.4.2
parso==0.7.1
pathtools==0.1.2
patsy==0.5.1
pickleshare==0.7.5
Pillow==7.2.0
prometheus-client==0.8.0
prompt-toolkit==3.0.7
protobuf==3.13.0
pyarrow==1.0.1
pycparser==2.20
pydeck==0.5.0b1
Pygments==2.7.1
pylint==2.3.1
pyparsing==2.4.6
pyrsistent==0.17.3
PySocks==1.7.1
python-dateutil==2.8.1
pywinpty==0.5.7
pyzmq==19.0.2
requests==2.24.0
requests-oauthlib==1.3.0
s3transfer==0.3.3
scikit-learn==0.23.1
scipy==1.4.1
seaborn==0.10.0
Send2Trash==1.5.0
six==1.12.0
sklearn==0.0
statsmodels==0.11.1
streamlit==0.67.1
tweepy==3.9.0
textblob==0.15.3
typed-ast==1.4.0
tzlocal==2.1
urllib3==1.25.10
validators==0.18.1
watchdog==0.10.3
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1
wrapt==1.11.2
xgboost==0.90
zipp==3.2.0
wordcloud==1.5.0
openpyxl==2.2.6
adafruit-io==2.4.0
Google-Images-Search==1.3.8
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.8.1+cpu
transformers==4.3.3

杜 -sh .[^.]* * | 排序-hr

1.1G    .heroku
1000K   TwitterSentimentAnalysis.ipynb
84K Logo1.jpg
76K nuvolarossa.jpg
72K nuvolablu.jpg
68K nuvolaverde.jpg
64K nuvolabianca.jpg
16K .profile.d
16K App_Streamlit.py
4.0K    setup.sh
4.0K    runtime.txt
4.0K    requirements.txt
4.0K    README.md
4.0K    Procfile
4.0K    Instructions.txt

基本上.heroku文件夹中的python文件夹是1.1G

所以我绝对应该减少lib。我已经能够使用 CPU 选项减小割炬尺寸

标签: pythonherokustreamlit

解决方案


推荐阅读