mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
How to allocate more CPU cores and Memory to a docker image/container ? #364
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @heli-aviator on GitHub (May 25, 2022).
Hi, I know this is not really an issue, but it's a user"me" issue, I'm running EndeavourOS latest,
I installed Monteray following the initial setup and then the
docker run itcommand from the read me page, and it works really good, but I would like to allocate more resources to the image/containerI've tried following some of the examples but I just can't get it to work.
Let's say the i.e.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 123456789 sickcodes/docker-osx:monterey "/bin/bash -c 'sudo …" 2 days ago Exited (0) 23 hours ago gifted_pirateI currently start the docker image with
docker start -ai 12345679how would I add the variables to give it 8cpu cores and 16gb ram?Eventually, when I can afford a 2nd GPU I would like to learn how to do GPU passthrough to that image as well.
It would be much appreciated if you could explain this to me in layman's terms, as I'm just starting to learn docker and VM's when you teach me how to do it I will make a YT video on my channel showing how to do it, because I'm sure I'm not the only one struggling with this stuff, in the beginning, I will give you full credit!
if any of these matters here are
my system specs:
MSI unify x570 MB
Ryzen 3950X
Radeon VII
32GB ram
m.2 pcie gen 4 storage
@imunique-ZJ commented on GitHub (Jun 7, 2022):
Hi, you can check this solution.
Say you need
8cpu cores, you can add following parameters to your docker run commandSince you have Ryzen 3950X, maybe you can use more cpu resources such as
And if you need
16gb ram, you can add this@heli-aviator commented on GitHub (Jun 8, 2022):
I've tried all the ways I can think of to implement that in my startup, but it does not seem to work.
Any input on how to implement that the right way?
@imunique-ZJ commented on GitHub (Jun 8, 2022):
I think you should declare how much resources you need when you
createthe container not whenstart.Here is my configuration
@uforek commented on GitHub (Feb 14, 2023):
Is there a way to update the RAM and CPU AFTER creation? I already installed Ventura and it takes a while. I'd like to avoid doing that all over again.
@imunique-ZJ commented on GitHub (Feb 14, 2023):
Not sure if it is possible
docker exportyour image asxxx.tardocker loadyourxxx.tardocker runwith updated resources allocation