14

I am completely new to Docker and Linux Subsystem on Windows [Ubuntu 22.04.1], which requires changing the CPU and RAM used in Docker, and I'm trying resolve a Parallel Computing on Windows Problem; however, as noted in the troubleshooting guide and on the Docker Settings' Advanced suboption in Resources, I need to change the .wslconfig file:

Any advice on how to fix this?

JW0914
  • 9,096
ineedhelp
  • 243

1 Answers1

29

Any advice on how to fix this?

  1. Create file: %UserProfile%\.wslconfig
  2. Within %UserProfile%\.wslconfig, paste:
    [wsl2]
    memory=4GB # Limits VM memory in WSL 2 to 4 GB
    processors=2 # Makes the WSL 2 VM use two virtual processors
    
  3. Since you are unlikely to be compiling and creating your own WSL2 Linux kernel, I have removed the line that sets the custom kernel that ALL WSL2 distributions would use.
JW0914
  • 9,096
Ramhound
  • 44,080