How to Create a custom opencv buildpack for heroku - opencv

Yes, I am aware of the fact that there are many compiled libraries available but currently, none of them are working properly. Also, the lack of proper guides which chalk out the steps for creating OpenCV buildpacks(or any buildpack for that fact of matter but more specifically opencv's buildpack) have lead me to post this question here. How to create custom a opencv buildpack? I want to make the compiled library from scratch and host it.
Again, emphasizing on the fact that I DON'T want to use the existing ones due to the problems in each of them. It would be awesome if someone could post a link to some guide or could give the steps to build one here itself. It would be very helpful for the poor souls who want to BUILD a custom buildpack on their own.

I managed to create a custom OpenCV buildpack using Docker. Then I deployed it on Heroku using Heroku Container Registry.
Here is the GitHub link for the repository which I created containing the Dockerfile used to install OpenCV and other libraries: https://github.com/hulkinBrain/docker-opencv2
Also here is the Docker hub link for the same: https://hub.docker.com/r/hulkinbrain/docker-opencv2/

Related

What is the difference between running a quick start version of hyperledger iroha and building iroha?

The documentation provided from the site https://iroha.readthedocs.io
highlight two different sections titled as Building Iroha and Quick Start Guide (which runs an example test version of Hyperledger Iroha). If any experts here could explain me on the difference between these two, I would be thankful.
Thanks!
Quick Start Guide provides instructions how to run iroha on docker - it is fastest and easiest way.
On the other hand building iroha from scratch is not really complicated, because we need just to copy few commands, and almost all dependencies would be downloaded automatically by vpkg, or with cmake.
About other differences:
When you use docker's image:
It is faster to set up, it is harder to make mistake and is more probably than docker's version is fully working.
When you build from scratch: You need to read more, find dependencies (there are listed for debian-based linuxes, but for Manjaro you need to find by your own). You also need to wait longer. And what is most important - you are not sure that Your version would work, or even compile (if something is changed in dependence libraries).
Personally despite all those disadvantages I prefer to build manually, because I prefer to compile on my system without extra layer like docker.

Using Github Project in Docker

I'm working on face detection project and trying to use this github project.
But the issue is I'm using windows system and have difficulties installing modules used in this project. I can use a VM, install linux and use it. But can I use docker to call the project from github and work with it? If yes, how to do it? I tried to read about it, but hardly got any materials.
Thank you!

Compile Tensorflow from source with Docker to get CPU speed up

I am looking for a way to set up or modify an existing Docker image for installing tensorflow that will install it such that the SSE4, AVX, AVX2, and FMA instructions can be utilized for CPU speed up. So far I have found how to install from source using bazel How to Compile Tensorflow... and CPU instructions not compiled.... Neither of these explain how to do this within Docker. So I think what I am looking for is what you need to add to an existing docker image that installs without these options so that you can get a compile version of tensorflow with the CPU options enabled. The existing docker images do not do this because they want the image to run on as many machines as possible. I am using Ubuntu 14.04 on linux PC. I am new to docker but have installed tensorflow and have it working without getting the CPU warnings I get when I use the docker images. I may not need this for speed, but I have seen posts that claim the speed up can be significant. I searched for existing docker images that do this and could not find anything. I need this to work with gpu so needs to be compatible with nvidia-docker.
I just found this docker support for bazel and it might provide an answer, however I do not understand it well enough to know for sure. I believe this is saying that you can not build tensorflow with bazel inside a Dockerfile. You have to build a Dockerfile using bazel. Is my understanding correct and is this the only way to get a docker image with tensorflow compiled from source? If so, I could still use help in how to do it and still get the other dependencies that I would get if using an existing docker image for tensorflow.
Dockerfiles that build with CPU support can be found here.
Hope that helps! Spent many a late night here on Stack Overflow and Github Issues and stuff. Now it's my turn to give back! :)
The GPU stuff in particular is really hairy - especially when enabling the XLA/JIT/AOT stuff as well as the Graph Transform Tools.
Lots of hacks embedded in my Dockerfiles. Feel free to review and ask me questions!
The contributing guidelines mention building TensorFlow from source with Docker to run the unit tests:
Refer to the
CPU-only developer Dockerfile and
GPU developer Dockerfile
for the required packages. Alternatively, use the said
Docker images, e.g.,
tensorflow/tensorflow:nightly-devel and tensorflow/tensorflow:nightly-devel-gpu
for development to avoid installing the packages directly on your system.

Is it possible to run a private Hex (Erlang) dependency manager (and if so how)?

I'm working in an Erlang environment. I'm looking to establish a dependency manager so that our build server can publish binaries for reuse instead of using source code dependencies. The Hexpm GitHub project implies that it is possible to run it outside of the hex.pm website, but I don't see any instructions for doing so. Specifically, I would like my build server to be able to publish packages either directly (via the filesystem) or via rebar3, and for subsequent rebar3 builds to be able to use those published packages
Is it possible to run Hex on my own server?
If so, where would I find some documentation on how to set it up (or provide the instructions directly)?
If you look at https://github.com/hexpm/hex_web there are instructions in the README.md for both installing and running it. It's a phoenix application, so it should all be relatively familiar ground if you've looked at the phoenix framework before.
As for getting rebar3 to work with your installation, there is documentation here as to the config values to use for setting the URLs to use for hex packages: http://www.rebar3.org/docs/hex-package-management.
HTH.

what could be a deployment strategy with pubspec on dart

What would be the best way to actually deploy dart code that has pubspec.yaml dependencies? A common thing I've done in the past was to create demos and deploy to github pages. Now that pub uses symbolic links the dependencies do not get pushed to github. Also wondering if this should be a bug to file for pub, being able to deploy with dependencies.
We aren't there yet, but pub will in the future support a deploy command. That will do things like run dart2js and concatenate/minify your code. It will also physically bring in all of your dependencies so you don't have symlinks. The end result will be a single directory that contains everything your package needs to run.
I think you have three options:
If you already have a server-side technology and a deployment strategy, use that.
If you're just deploying static stuff, I wonder if Google App Engine would work with these symlinks.
Heroku supports Dart, although I'm not sure how it supports symlinks.
You can deploy your Dart application on Heroku cloud hosting. There is a step-by-step tutorial here.
It works nice.

Resources