-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install as a service via systemd (Docker cannot be used).
- Loading branch information
Showing
4 changed files
with
102 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Installation and running via Docker | ||
|
||
<dev>For easier deployment of the agent apps we can use Docker.</del> | ||
|
||
> `psutils` cannot see process details (user, creation time, command) on the host | ||
OS - by definition os container this is separated. This is a design fault of the | ||
dockerized solution and I'm not sure if it can work at all. | ||
See https://github.com/rossumai/nvgpu/issues/2. | ||
|
||
It needs [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) installed. | ||
|
||
```bash | ||
# build the image | ||
docker build -t nvgpu . | ||
|
||
# run CLI | ||
nvidia-docker run --rm nvgpu nvl | ||
|
||
# run agent | ||
nvidia-docker run --rm -p 1080:80 nvgpu | ||
|
||
# run the master with agents specified in ~/nvgpu_master.cfg | ||
nvidia-docker run --rm -p 1080:80 -v $(pwd)/nvgpu_master.cfg:/etc/nvgpu.cfg nvgpu | ||
|
||
open http://localhost:1080 | ||
``` | ||
|
||
You can set the containers for automatic startup with `--restart always` option. | ||
|
||
Note: Docker containers have some hash as hostname (it's not the host machine hostname). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=NVGPU agent | ||
|
||
[Service] | ||
User=nvgpu | ||
Group=nvgpu | ||
Environment=NVGPU_CLUSTER_CFG=/etc/nvgpu.conf | ||
Environment=FLASK_APP=nvgpu.webapp | ||
Environment=FLASK_HOST=0.0.0.0 | ||
Environment=FLASK_PORT=1080 | ||
ExecStart=/bin/bash -c "/usr/local/bin/flask run --host $FLASK_HOST --port $FLASK_PORT" | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=multi-user.target |