-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[WIP] Switch from ubuntu base docker image to debian #879
Conversation
Switched backend docker file to jessie-slim :)
Moved from ubuntu to buster slim :)
switched to python3 prebuild to fix django issue
Out of curiosity, did you recently add PR quality review for the docker files, since the current docker file do not comply with the ruels listed in the tooling. There is a lot of refactoring needed :/ We are just using workarounds to ignore |
@Langhalsdino , the PR cannot be built by travis. Also it is not enough just change one base image on another. You need to provide some evidence that the change works as expected. It is a complex process. I will suggest starting from some simple changes to speed up the build. Some ideas:
Also when you try to "improve" build you need to provide some KPIs: initial build time, increment build time, size of images, etc. P.S. If you are ready to help I will be glad to guide you. If you don't have a lot of time I will recommend to close the PR. |
Ahh sorry, did a small change in the docker file on the last commit and did not test it. I get what you describing, about best practices and what we should ultimately thrive for. I did not only change the base image, there are a couple of adjustments that needed to be made in order to get it working. It tested the following configuration and succeeded:
Do you need screenshots as proof? Test are succeeding, too :) Regarding the "faster" build times: Overall here is my proposal - Lets have a three stage process:
Btw. i would like to test the PR Quality locally, so that i do not need to push it all the time, is there a way to perform the test locally? |
Which version of ffmpeg does it use? Does it behave the same as the current version of ffmpeg? I have to say that the change can be really critical. |
@Langhalsdino , I will initiate a new discussion with our legal and open source department for sure but it will not be easy or quick process. I will come back with some notes. |
The main challenge is, that the current docker file does not describe a fixed version ether, but i am using the same gstreamer0.10-ffmpeg version. Gstreamer is probably the one that caused the most headaches and it was the reason, why i needed to use jessie and not buster. If i am not mistake a fresh build should currently grab ffmpeg_2.8.6-1 on ubuntu xenial and jessie is currently getting ffmpeg_2.6.9 . While looking at the change logs i did not see a red flag, but honestly i do not know the exact internals that you are using, so we might need to check it. |
Sure, lets start the discussion :) |
The biggest challenge will probably be CUDA support 🙈 But we can probably publish a base image that has features like CUDA, ... disabled. |
Unfortunately it doesn't matter under which license the project was published. We should not violate licenses/patents of other companies. Internally we have strict rules and guidelines. First of all thanks for the PR. It seems I have new facts now and I can get right steps to publish a docker image for the tool on DockerHub (using https://hub.docker.com/u/openvino as an example). I don't think that you can help in the process because it is very specific. Thus I'm going to close the PR. But I promise to come back with a PR to solve the issue in the nearest future :). At the same time if you can help us with issues which I described in the PR it will be awesome. Once again thanks for your help and bringing the problem to the table again. |
Sure, i would love to help. But we may have started off on the wrong foot, so how can i help you and contribute :) |
@Langhalsdino , indeed legal questions are tough for all of us and should be handled on our side to avoid any issues. Now I have recommendations that even ubuntu base image should work if we do things right. But before to publish an image on docker hub I have to review with appropriate departments all packages which we are using to create the image. I would happy delegate such kind of activities but I cannot. At the same time we have the plenty of technical issues summited by different users. If you can help with any of them it will be awesome. If you come up with a good idea and prototype how to improve our docker build you are welcome. But if you suggest submitting something on the docker hub it is not a technical problem. |
Sure, i get the legal troubles. As mentioned above, especially using packages such as ffmpeg with all the provided codecs need probably a lot of in-depth analysis before you can publish it on docker hub. And most likely cuda support will not make it to docker hub.
Even-though, some of the suggested changes by this PR include faster build times and smaller docker images. Maybe we can start with this and move forward to increase the quality of docker files :) |
This pull request switched the docker images from being ubuntu based to debian.
More about the reasons in #7
Why did i choose python:3.6.9-jessie for cvat-backend?
Sadly only jessie has pre compiled ffmpeg and gstreamer libraries, therefore we can not use stretch or jessie. Furthermore to reduce the compile time, i decided to go with python 3.6.9 base image that includes pip3, python3, ...
Why did i choose node:10.16.3-buster-slim for cvat-ui?
Mostly, since buster is the newest stable debian release and the node container has node 10.16.3 preinstalled (previously used node version).
I did not test all of the features, such as CUDA, Autosegmentation, ... and would appreciate help with testing it. There are probably further adjustments needed. Feel free contribute or share bugs :)