cgroup 使用实例:pip install
ysh One
1
2
3
4
5
sudo apt install cgroup-tools
sudo cgcreate -g memory:/pip_memory_limit
sudo echo 60G | sudo tee /sys/fs/cgroup/pip_memory_limit/memory.max
# 实操
sudo cgexec -g memory:pip_memory_limit pip install <package_name>
Powered by Hexo & Theme Keep