Closed gtntdev closed 1 year ago
You can add it. Ill merge it in, make sure its documented well. I dont know much about docker as I use ansible for all deployment needs. The 0kb issue is with the file naming between version of ubuntu and windows apparently with /n/r and the /tmp directory. Shouldnt be hard to fix. Ill try to actually get to it this week.
A first version of the docker variant is available here. I added a first version of documentation in the README. My problem is with the image size (torch, torchvision and torchaudio take up 2.5GB of the whole 3GB image, don't know if I can get this smaller). Will improve the docs this week and clean up commits and so on before the PR. @nadermx please let me know if you want to have any basic changes. Ofcourse you will have to sign up with docker.hub yourself but I'll provide you with the official guide and a short video what to change in my github actions (it's just about a few minutes to get this working with good instructions)
If you want to try the new version, finally got around to fixing the 0kb issue in none linux I believe. pip install --upgrade backgroundremover
another recent (and good 👌) dockerfile + compose yaml file
alternative https://gist.github.com/benperiton/2d37ea18377a80f9b9768522d08a4253
Hi @eevmanu , these two Dockerfiles basically do the same things, and they both produce images way to large. There is an approach to decrease the size: multi-stage building. E.g. first you install all depencies as static librarys and compile your programm into binaries. Second you move your static output to a new image to get rid of all the overhead which was needed during the initial building process. However this only works out with compiled programming languages, since python is interpreted this is just not possible. I once read a bit about optimizing container in size but then stoped as I didn't get a feedback and the existing solution worked for me. But we should come up with some similar efficient strategy to improve the image size. Give me a few more days and I will come back to you (hopefully with a good approach - any hint is welcome:)) Best regards, Lukas
Yea, mine was just to test this out - not really for any serious use - someone on HN asked me to share it, so I chucked it up. Although for my intended use case, 5GB is nothing (storage is cheap)
Same with me. I had to learn it the hard way, that installing these kind of images e.g. on a RPi is quite painful if they're not optimized. Just had a quick search and I guess we can get a "good enough" dockerization. Just let my apply those techniques and then I'll report back.
Okay, so just to clarify as I have never used Docker (ansible type of guy). I just go to docker, make an account and you then make a pull request with this, or I put it in?
Okay, progress on this, https://hub.docker.com/r/nadermx/backgroundremover If some one wants to make a PR to this repo with the file, I think then I can push it to docker? I can find a tutorial, or some one has a quick one would be helpful
Hi @nadermx , here is a quick guide to get you started. Actually you just need to create an api token for the repo and can leave out all the rest. I'll provide you with the github workflow action where you only will have to fill in the creds. Please give me till the end of this week, to get a reasonable Dockerfile including all new commits and testing. Best, Lukas
Awesome, token made. If you want I can make you a collaborator on the Docker
I have created a docker image, if there is enough interest in it (likes) and @nadermx wants to support this kind of deployment I'll create a PR. So far the image processing works fine with all the models and other options, videos seem to work but the output file size is 0 Byte so this will still need some investigation.