Heroku一直在安装我之前上传的torch包



我正在部署到heroku,但超出了500mb的段塞大小。

remote:        Collecting torch>=1.0.0
remote:          Downloading torch-1.7.1-cp36-cp36m-manylinux1_x86_64.whl (776.8 MB)

火炬继续安装与700mb空间。我删除了构建缓存和删除火炬在我的需求。txt,但slug继续安装相同的火炬1.7.1

这是我的requirements.txt

astroid==2.4.2
atomicwrites==1.4.0
attrs==20.3.0
bert-extractive-summarizer==0.6.1
bert-score==0.3.7
certifi==2020.12.5
click==7.1.2
colorama==0.4.4
Flask==1.1.1
gunicorn==20.0.4
importlib-metadata==3.4.0
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.2
joblib==1.0.0
lazy-object-proxy==1.4.3
markdown==3.3.3
MarkupSafe==1.1.1
mccabe==0.6.1
more-itertools==8.6.0
newspaper3k==0.2.8
nltk==3.5
numpy==1.17.2
packaging==20.8
pandas==1.1.3
pluggy==0.13.1
protobuf==3.14.0
py==1.10.0
pygments==2.7.1
pylint==2.3.1
pyparsing==2.4.7
pytest==4.6.3
regex==2020.11.13
requests==2.25.1
scipy==1.4.1
sentencepiece==0.1.95
six==1.15.0
sumy==0.8.1
transformers==4.2.1
tqdm==4.56.0
typed-ast==1.4.2
typing-extensions==3.7.4.3
waitress==1.4.4
wcwidth==0.2.5
Werkzeug==1.0.1
wincertstore==0.2
wrapt==1.12.1
zipp==3.4.0

你必须把这些更新的requirements.txt也推送到git中。从requirements.txt中删除后,您可以执行:

git add .
git commit -m "modify requirements.txt"
git push -u origin master

之后push到heroku

git push heroku master

最新更新