update readme
This commit is contained in:
parent
f389c9c3f0
commit
1d2ddb82be
@ -74,7 +74,7 @@ def auto_set(num, allow_nonfree=True, ask=True, blacklist=[], show=True):
|
|||||||
# some code here.
|
# 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.
|
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 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:
|
To use this in docker, try the following steps:
|
||||||
@ -91,6 +91,7 @@ user1 97 tmux
|
|||||||
user1 98 -zsh
|
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.
|
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.
|
3. run the configuration script.
|
||||||
```shell
|
```shell
|
||||||
python -m gpuutil.set_redirect -nv path/to/your/nvidia/output -ps /path/to/your/ps/output -pst cmd=command,username=user
|
python -m gpuutil.set_redirect -nv path/to/your/nvidia/output -ps /path/to/your/ps/output -pst cmd=command,username=user
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user