权限被拒绝:Heroku + Docker + Conda部署

时间:2019-09-25 20:05:50

标签: python docker heroku dockerfile conda

Heroku有一个示例示例存储库,该示例库利用Docker容器注册表存储了Anaconda软件包:

I forked this repository并推送single commit,添加一个heroku.yml文件:

build:
  docker:
    web: Dockerfile

通过这种方式,我可以git push到Heroku远程服务器,并且图像将在他们的服务器中构建。推送更改went well(图像已成功构建)。

但是,然后,当尝试向服务请求时,出现错误:

2019-09-25T19:50:18.000000+00:00 app[api]: Build started by user <my_email>
2019-09-25T19:53:16.000000+00:00 app[api]: Build succeeded
2019-09-25T19:53:16.436402+00:00 app[api]: Deploy 6bd60459 by user <my_email>
2019-09-25T19:53:16.436402+00:00 app[api]: Release v93 created by user <my_email>
2019-09-25T19:53:18.407563+00:00 heroku[web.1]: State changed from crashed to starting
2019-09-25T19:53:40.751324+00:00 heroku[web.1]: Starting process with command `/bin/sh -c gunicorn\ --bind\ 0.0.0.0:\15070\ wsgi`
2019-09-25T19:53:43.694756+00:00 heroku[web.1]: State changed from starting to crashed
2019-09-25T19:53:43.673120+00:00 heroku[web.1]: Process exited with status 1
2019-09-25T19:53:43.586712+00:00 app[web.1]: Traceback (most recent call last):
2019-09-25T19:53:43.586736+00:00 app[web.1]: File "/opt/conda/bin/gunicorn", line 7, in <module>
2019-09-25T19:53:43.586738+00:00 app[web.1]: from gunicorn.app.wsgiapp import run
2019-09-25T19:53:43.586759+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 9, in <module>
2019-09-25T19:53:43.587076+00:00 app[web.1]: from gunicorn.app.base import Application
2019-09-25T19:53:43.587078+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/gunicorn/app/base.py", line 12, in <module>
2019-09-25T19:53:43.587080+00:00 app[web.1]: from gunicorn import util
2019-09-25T19:53:43.587081+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/gunicorn/util.py", line 12, in <module>
2019-09-25T19:53:43.587082+00:00 app[web.1]: import pkg_resources
2019-09-25T19:53:43.587084+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2927, in <module>
2019-09-25T19:53:43.587086+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2913, in _call_aside
2019-09-25T19:53:43.587144+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
2019-09-25T19:53:43.587191+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 626, in _build_master
2019-09-25T19:53:43.587258+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 619, in __init__
2019-09-25T19:53:43.587340+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 675, in add_entry
2019-09-25T19:53:43.587384+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 1982, in find_on_path
2019-09-25T19:53:43.587445+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2370, in from_location
2019-09-25T19:53:43.587499+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2687, in _reload_version
2019-09-25T19:53:43.587561+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2335, in _version_from_file
2019-09-25T19:53:43.587626+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 2503, in _get_metadata
2019-09-25T19:53:43.587688+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 1873, in get_metadata_lines
2019-09-25T19:53:43.587751+00:00 app[web.1]: File "/opt/conda/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg/pkg_resources/__init__.py", line 1861, in get_metadata
2019-09-25T19:53:43.587854+00:00 app[web.1]: IOError: [Errno 13] Permission denied: '/opt/conda/lib/python2.7/site-packages/.wh.conda-4.2.15-py2.7.egg-info'

为什么会这样,我该如何解决?

0 个答案:

没有答案