I tried using this custom buildpack https://github.com/gimlids/heroku-buildpack-python-opencv
But compilation fails due to a 15 minute timeout.
I also tried setting COMPILE_TIMEOUT: 6000
but it Didn't help
要解决 heroku 上 buildpack 的 15 分钟编译时间限制,请使用heroku-anvil编译 slug。
I found a buildpack that worked well from a similar question about Heroku and OpenCV with Python . I tried to replicate Diogo's work and added a few additional steps to add ffmpeg support and documented the steps in a blog post: How to Install OpenCV on Heroku .
use a 'one-off' dyno (aka heroku run bash
) to compile, push the results to gihub (or store it anywhere else in the cloud), then use that url for your buildpack.
tl, dr; - avoid to re-compile each and every time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.