New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run scenedetect on bluemix cf app #24
Comments
Try installing python-opency using os package manager like APT or yum |
For some reason |
You should be able to sudo. https://developer.ibm.com/answers/questions/187174/virtual-images-cannot-sudo-within-a-ubunutu-image.html |
I'll elaborate what @yashgoyalMIT was trying to say. We are using cloud foundry to deploy the flask app on bluemix. Cloud foundry skips the |
You should find a the correct "buildpack" which contains OpenCV, without it it wont run. |
Unfortunately, by default OpenCV relies on ffmpeg for video I/O. It's usually best to compile OpenCV from source where you can't obtain a Linux package, rather than use the Are you able to build OpenCV from source locally? If you have a machine that matches the server architecture, you may have better luck compiling the OpenCV Python module locally, and installing that version on your server via In these cases, you need to ensure that OpenCV is compiled with ffmpeg support, and that an ffmpeg package/library is available on the target system. You can also look into compiling OpenCV with |
I am able to build OpenCV from source locally but the problem comes up when I try the same on Bluemix Cloud Foundry App. The build fails on |
@Breakthrough Thanks for the reply. We were able to compile the OpenCV with ffmpeg and the python bindings for it using your docs here. Worked like a charm on our local machines (Ubuntu 16.04 64bit, the server is ubuntu 14.04 64bit) We then tried to do the same on the linux server and the cloud foundry container on it. Since it's a cloud infrastructure, we don't have sudo rights, hence I have been trying to get help on their slack team as well, they are suggesting building ffmpeg first, then opencv, then the python bindings from source itself and not use sudo. This raises an issue of building and installing ffmpeg and opencv, without |
@kartikarora / @yashgoyalMIT if The actual folder to place the compiled files when calling Once the install prefix is configured to a folder you have write permissions to, you should be able to call Please feel free to keep us posted with any progress; this should definitely be possible, so I'm interested in knowing what solution ends up working. |
@kartikarora / @yashgoyalMIT any luck using the |
@Breakthrough I've been trying to put all the @yashgoyalMIT tried building a docker image of our local system and upload it on a container. He has been successful in building and running it. Now we looking into scaling it and running our flask app behind an apache/nginx server to bind the app to multiple ports and for load balancing. |
@Breakthrough The only way I could get this to work was by building a docker image with all the dependencies for the flask app and then deploying it to IBM Bluemix container service which runs the docker containers in a hosted cloud environment on IBM Bluemix. This is what my Dockerfile looks like:
Advantages of this approach is that I have more control over my application but there is one downside that the whole delivery pipeline is slower as compared to cloud foundry app delivery pipeline even when all the build steps are cached in the next cycle. The delay is mostly on Bluemix's end. Either ways the issue is resolved. Thanks a lot for the support. |
@yashgoyalMIT glad you found an approach to resolve the issue, using a Docker container seems like a novel approach (although as you mentioned, deployment will be a lot slower in that regard). Thanks again for your submission & feedback :) |
I am running a python flask app on bluemix. The code runs perfectly well on local machine( macbook pro) but for some reason I am unable to run it on bluemix. Error is shown below:
TypeError: 'int' object is not iterable
The reason I am getting this error is because opencv-python which is being installed (via pip) does not support ffmpeg and thus it is unable to run this line of code.
returns false
Any solution for this?
The text was updated successfully, but these errors were encountered: