-
Notifications
You must be signed in to change notification settings - Fork 482
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
docker buildx run yum install very slow, while docker build is fine #379
Comments
The same problem |
I also have the same problem. While using buildkit by default for some time via Docker 20.10.6 on Fedora 33 on NVMe SSD. |
I happen to have same problem. Process goes on, but taking mostly 1 core and takes veeeeeeery long. Any leads on that? |
Similar problem with |
Same issue, any update? |
The same problem here. |
not only yum install, but also npm install or any other large amount of file IO manipulations for example, 10 minutes for |
Ye, I would probably try to use buildkit but this is a blocker for me. |
I recently ran into this issue as well. check the systemd service for docker. It was set to infinity which sets the ulimit to
When I changed the limit for nofile to 1024000, it resolved the problem and it works like normal docker build
you can check the ulimit with a build
|
Thanks @slimm609! I've workarounded it by adding Example:
Hope this helps someone. |
1065: Workaround for slow CentOS builds depending on the ulimit. r=Emilgardis a=Alexhuszagh Fixes CentOS builds being ~10x slower with certain configurations, where `LimitNOFILE=infinity`. This sets the ulimit for open file descriptors manually, which fixes the issue. See the upstream issue docker/buildx#379. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
1065: Workaround for slow CentOS builds depending on the ulimit. r=Emilgardis a=Alexhuszagh Fixes CentOS builds being ~10x slower with certain configurations, where `LimitNOFILE=infinity`. This sets the ulimit for open file descriptors manually, which fixes the issue. See the upstream issue docker/buildx#379. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
1065: Workaround for slow CentOS builds depending on the ulimit. r=Emilgardis a=Alexhuszagh Fixes CentOS builds being ~10x slower with certain configurations, where `LimitNOFILE=infinity`. This sets the ulimit for open file descriptors manually, which fixes the issue. See the upstream issue docker/buildx#379. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
It is also possible to just set ulimit via the command line, for example: docker build --ulimit nofile=1024000:1024000 . In this way |
Fingers crossed for: docker/buildx#379 The doc is really fuzzy on if the ulimit option works with Buildkit, and buildx uses buildkit.
This does not work with Presently you need to provide via Once the Go 1.19 regression is fixed (and backported), you would then prefer |
@polarathene, would it be possible for you to provide a link to the issue (I.E. |
Here you go (provides links to relevant tracking issues), but it has been resolved since Go 1.19.9 and Go 1.20.4 releases. These are available with Docker Engine 23.0.6 and 24.0.0 releases, while Containerd is releases 1.6.21 and 1.7.1. Neither Docker Engine (moby) or Containerd projects have accepted PRs for setting I've not confirmed if that resolves |
This problem maybe caused by a rpm bug(https://bugzilla.redhat.com/show_bug.cgi?id=1537564), I found that in buildx, containerd ulimit is very large (1073741816). |
@LeeXN I briefly explained this in my last comment above. The problem is Docker and Containerd both package a systemd service with
|
Otherwise at least `yum` can take ages to complete, see e.g.: docker/buildx#379
Otherwise at least `yum` can take ages to complete, see e.g.: docker/buildx#379
Migrate these builds to linux 2023. We want to build and test the Docker images in CD. Looks like we are hitting this issue: docker/buildx#379 when trying to build Docker on Amazon Linux 2023. Conda Docker build is timing out. While Manywheel is executing but failing because BUILDKIT is turned off: https://github.com/pytorch/pytorch/actions/runs/11036043157/job/30653543264?pr=136544 Proposed Solution is to fix it in user_data . Please see: pytorch/test-infra#5712 I see docker builds are executed successfully here: https://github.com/pytorch/pytorch/actions/runs/11040149229/job/30667448668?pr=136544 Workaround timeout problem (reported in https://bugzilla.redhat.com/show_bug.cgi?id=1537564 ) by configuring number of open files per container to 1048576 Pull Request resolved: #136544 Approved by: https://github.com/ZainRizvi Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
Migrate these builds to linux 2023. We want to build and test the Docker images in CD. Looks like we are hitting this issue: docker/buildx#379 when trying to build Docker on Amazon Linux 2023. Conda Docker build is timing out. While Manywheel is executing but failing because BUILDKIT is turned off: https://github.com/pytorch/pytorch/actions/runs/11036043157/job/30653543264?pr=136544 Proposed Solution is to fix it in user_data . Please see: pytorch/test-infra#5712 I see docker builds are executed successfully here: https://github.com/pytorch/pytorch/actions/runs/11040149229/job/30667448668?pr=136544 Workaround timeout problem (reported in https://bugzilla.redhat.com/show_bug.cgi?id=1537564 ) by configuring number of open files per container to 1048576 Pull Request resolved: pytorch#136544 Approved by: https://github.com/ZainRizvi Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
docker buildx
run yum install very slow, whiledocker build
is finebuild with these commands bellow,
docker build
takes about 3min to finish, whiledocker buildx build
takes about 3 hours.sudo docker build -f centos7.Dockerfile .
I think
docker buildx
should usedocker build
caches, but it's not. This is unexpected.centos7.Dockerfile
The text was updated successfully, but these errors were encountered: