From 1d2ddb82bed2fec433f11985fb3a5953bca72525 Mon Sep 17 00:00:00 2001 From: zmy Date: Tue, 22 Dec 2020 19:49:23 +0800 Subject: [PATCH] update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f913c6..e3e053b 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ def auto_set(num, allow_nonfree=True, ask=True, blacklist=[], show=True): # some code here. ``` -# Use this inside an docker. +## Use this inside an docker. For some reason, codes that running in docker cannot get the correct information about the process that using the gpu. To support that, gpuutil supports read the output command of nvidia-smi and ps from an given file, which should be generated by you from host machine To use this in docker, try the following steps: @@ -91,6 +91,7 @@ user1 97 tmux user1 98 -zsh ``` if your generated output have different name, for example when you are using ```docker top``` instead of ```ps```, the ```COMMAND``` section would be ```CMD```, therefore you need prepare a dict that maps its name to either of ```user, pid, command```, note that its insensitive to upper case. + 3. run the configuration script. ```shell python -m gpuutil.set_redirect -nv path/to/your/nvidia/output -ps /path/to/your/ps/output -pst cmd=command,username=user