Skip to content
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

[Bug]: DinD doesn't allow setting memory or CPU limits #1854

Open
mtaran opened this issue Oct 17, 2024 · 0 comments · May be fixed by #1859
Open

[Bug]: DinD doesn't allow setting memory or CPU limits #1854

mtaran opened this issue Oct 17, 2024 · 0 comments · May be fixed by #1859
Labels
bug Something isn't working

Comments

@mtaran
Copy link
Contributor

mtaran commented Oct 17, 2024

Steps to reproduce

  1. make a repro.dstack.yml with:
type: task
name: my-repro-task
image: dstackai/dind:latest
privileged: true
commands:
  - start-dockerd
  - sleep infinity
resources:
  cpu: 4..
  memory: 6GB..
  1. dstack apply -f repro.dstack.yml -y
  2. in another terminal: dstack attach my-repro-task
  3. in yet another terminal: ssh my-repro-task
  4. in the ssh session, try to run docker run --rm --cpus=1 hello-world or docker run --rm --memory=1gb hello-world

Actual behaviour

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: cannot enter cgroupv2 "/sys/fs/cgroup/docker" with domain controllers -- it is in threaded mode: unknown.

Expected behaviour

Container runs and is limited in the amount of memory/CPUs it can use.

dstack version

0.18.18

Server logs

No response

Additional information

Googled for the error message and it seems like there should be some way to do this, e.g. some stackoverflow links pointed to earthly/earthly#3203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant