[Details]. Docker + WSL2 defaults to only use 8GB system RAM. Bump it up to max.
C:\Users\yourUserName\.wslconfig
[wsl2]
#kernel=C:\\temp\\myCustomKernel
memory=4GB # Limits VM memory in WSL 2 to 4 GB
#processors=2 # Makes the WSL 2 VM use two virtual processors
wsl --shutdown in Powershell).profile, but many installs default to .bashrc (eg Anaconda). Load .bashrc via .profile
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
export TERM=xterm-256colorDocker on WSL2 has a memory leak. Periodically clear the cache
echo 1 | sudo tee /proc/sys/vm/drop_cachessh ./Anaconda-whatever.shconda command not recognized after shell restart, try moving whatever it added to ~\.bashrc to ~\.profilepip install git+https://github.com/docker/docker-py.git
pip install git+https://github.com/yoanisgil/compose.git@device-requests --ignore-installed PyYAML
~/.profile: export COMPOSE_API_VERSION=autoSee more tricks here (note-to-self: add the useful ones into this post).

Long coding sessions lead to physical fatigue and mental fog. A walking desk keeps you alert and focused, preventing costly bugs and burnout.Stay focused and healthy during long coding sessions.Get the factsGet the facts