我試圖部署在彈性魔豆的燒瓶中的應用程序,但我得到以下錯誤,當我運行eb create
:如何包括非PIP依賴於AWS彈性魔豆
ERROR: Your requirements.txt is invalid. Snapshot your logs for details.
ERROR: [Instance: i-04837a6167d3738a3] Command failed on instance. Return code: 1 Output: (TRUNCATED)...)
File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
看來問題是來自應用程序使用的文章提取庫(http://newspaper.readthedocs.io/en/latest/index.html),它具有一些相關性,如sudo apt-get install libxml2-dev libxslt-dev
和sudo apt-get install libjpeg-dev zlib1g-dev libpng12-dev
。
如何在Elastic Beanstalk上安裝這些依賴關係?