1

私は、Heroku で作業している django と rpy2 で小さなものを取得する能力の限界に達している初心者です。特に、rpy2 が作成する同時実行の脆弱性をテストして、Heroku が (dyno 分離を介して) 保護するかどうかを確認しようとしています。

django サンプルのデプロイは問題ありませんが、rpy2 を追加すると、満たされていない R 依存関係にヒットします

git push heroku master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (11/11), 3.97 KiB, done.
Total 11 (delta 0), reused 0 (delta 0)

-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.3.
-----> Preparing Python runtime (python-2.7.3)
-----> Installing Distribute (0.6.34)
-----> Installing Pip (1.2.1)
-----> Installing dependencies using Pip (1.2.1)
       Downloading/unpacking Django==1.5 (from -r requirements.txt (line 1))
         Running setup.py egg_info for package Django

       Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 2))
         Running setup.py egg_info for package argparse

           no previously-included directories found matching 'doc/_build'
           no previously-included directories found matching 'env24'
           no previously-included directories found matching 'env25'
           no previously-included directories found matching 'env26'
           no previously-included directories found matching 'env27'
       Downloading/unpacking rpy2==2.3.4 (from -r requirements.txt (line 3))
         Running setup.py egg_info for package rpy2

           sh: R: not found
           Error: Tried to guess R's HOME but no R command in the PATH.
           Complete output from command python setup.py egg_info:
           running egg_info

       creating pip-egg-info/rpy2.egg-info

       writing pip-egg-info/rpy2.egg-info/PKG-INFO

       writing top-level names to pip-egg-info/rpy2.egg-info/top_level.txt

       writing dependency_links to pip-egg-info/rpy2.egg-info/dependency_links.txt

       writing manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt'

       warning: manifest_maker: standard file '-c' not found



       sh: R: not found

       Error: Tried to guess R's HOME but no R command in the PATH.

       ----------------------------------------
       Command python setup.py egg_info failed with error code 1 in /app/build/rpy2
       Storing complete log in /app/.pip/pip.log
 !     Heroku push rejected, failed to compile Python app

To git@heroku.com:infinite-plateau-7086.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:infinite-plateau-7086.git'

init.r を追加すると、Heroku で R アプリが認識され、R が起動します

    $ git push heroku master
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (13/13), 4.15 KiB, done.
Total 13 (delta 1), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> R app detected
       Vendoring R 2.15.1
       Downloading and unpacking R binaries
       Executing init.r script
       R 2.15.1 successfully installed
-----> Discovering process types

-----> Compiled slug size: 96.7MB
-----> Launching... done, v5
       http://infinite-plateau-7086.herokuapp.com deployed to Heroku

To git@heroku.com:infinite-plateau-7086.git
 * [new branch]      master -> master

ただし、init.r ファイルの有無にかかわらず、アプリの認識では、R を使用した django が表示されません。

$ git push heroku master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 289 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
 !     Heroku push rejected, no Cedar-supported app detected

To git@heroku.com:infinite-plateau-7086.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:infinite-plateau-7086.git'

rビルドパックマルチビルドパックを使用して、r djangoの相互作用を可能にしています。上記の依存関係の競合を解決する方法を知っている人はいますか (最終的には 2 つを一緒に使用したいため)、または R と python の相互作用が Heroku で安全にスケーリングできないかどうかは?

4

0 に答える 0