-
Notifications
You must be signed in to change notification settings - Fork 315
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
Fix Build Dependency for Docker #5156
base: master
Are you sure you want to change the base?
Conversation
Allow latest version to build in Docker. Latest Revision require ffmpeg 7 to get libvodec61. Which means base image must be updated to ubuntu 24.10
Isn't ffmpeg being built from source in docker? |
Apparently not, when not explicitly installing FFMPEG it would complain libavcodec61 not found at runtime(build linux and therfore docker build would finish and report success). And when running with old dockerfile with ubuntu 22.04 the installed FFMPEG would not allign with version 61, as libavcodec61 require FFPMEG7 which is not supported on ubuntu 22 |
Given the nature and purpose of docker containers, I personally think it makes more sense to workaround the issue through building stage then adding unnecessary and potentially confusing arguments for runtime. |
Agree @PatrickChenHZ Make the suggested changes, and then it can be merged. Thank you! |
…s update a couple deprecated docker syntax. Also added more troubleshooting recommendations to DockerRun.sh
Updated accordingly, please review. |
@PatrickChenHZ Did you review my improvement suggestions? |
@MackBambu Sorry, maybe I missed something but I couldn't see the suggestions beyond what was mentioned in the linked issue in either file review section nor file comments. Just made suggested changes. Please review! Thanks! |
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than a small nitpick, looks good
@MackBambu
in which the actual error of interest is
I included some debugging suggestions in the DockerRun.sh File in the previous commits that should help navigate around this. I did not edit them directly as different environment would have different results(related to Docker Daemon UID and your user UID), so I left it in its simplest form. It will also depend on if there is BambuStudio already on the host OS as it tries to access the config from the host. Though thus far the most universal DockerRun.sh form(which forcefully overwrites the container UID) is as below
I've tested this in a fresh Ubuntu VM and it works fine. You do have to run
outside the container for GUI to work, else CLI commands works perfectly. Please let me know if the above DockerRun.sh helps addressing the problem and if I should just make this the default. Thank you @calh I did make another commit that removed Bash from DockerFile and also addressed another potential building issue. |
@PatrickChenHZ
These parameters are very effective, and now I can run normally on the VM ! Do they only apply in VM environments? Can they work properly in non-VM environments? |
These parameters apply outside a VM as well, it works perfectly on my ubuntu and Arch workstations and all other non-VM machines I've tested on(something around 30 machines). I mentioned VM only because I wanted to test in a clean environment to make sure it is not working just because some configs on my workstations. The user ID issue is known and yet also entirely environment-dependant. Please try to pull the latest commit from my fork, the bug fix I mentioned in the last comment is to fix this building issue. Though its more of a omit warning than a fix. It just adds the -o/--non-unique to line 93 to ignore the error. It will work in certain environment but not others(out of the box with provided DockerRun.sh) in my fork. In all other cases by using the DockerRun.sh I attached above(aka just adding all the suggested arguments in the DockerRun.sh comment section) it will just bypass all possible problems. I am working on an actual fix to this problem as opposed to just omitting the errors. I expect to make a push today. I will leave a comment once that's done. I make extensive use of containerized Bambu Studio in our production environment so I do see this error showing up quite often, and I believe I found the fix for it. Thanks! |
Allow latest version/release to build in Docker.
Latest Revision require ffmpeg 7 to get libavcodec 61. Which means base image must be updated to ubuntu 24.10.