1
0
mirror of https://github.com/newnius/YAO-docs.git synced 2024-07-06 05:15:18 +00:00
YAO-docs/sbin/run_agent.sh

28 lines
747 B
Bash
Raw Normal View History

2019-04-16 10:14:49 +00:00
#!/bin/bash
2020-06-02 14:00:52 +00:00
ip=`hostname --ip-address`
2019-04-16 10:14:49 +00:00
docker run \
2019-12-04 12:29:53 +00:00
--gpus all \
2020-07-02 06:35:24 +00:00
--pid=host \
2019-04-16 10:14:49 +00:00
--name yao-agent \
2019-12-04 12:29:53 +00:00
--network yao-net \
--network-alias $(hostname) \
--hostname $(hostname) \
-d \
--restart always \
--detach=true \
2020-06-02 14:00:52 +00:00
--publish 8000:8000 \
2019-12-04 12:29:53 +00:00
--env ClientID=$(hostname) \
--env ClientHost=$(hostname) \
2020-06-02 14:00:52 +00:00
--env ClientExtHost=${ip} \
--env Port=8000 \
--env HeartbeatInterval=5 \
2020-07-08 13:26:46 +00:00
--env ReportAddress='http://yao-scheduler:8080/?action=agent_report' \
2020-07-02 06:35:24 +00:00
--env EnableEventTrigger='true' \
--env PYTHONUNBUFFERED=1 \
2019-12-04 12:29:53 +00:00
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
2019-04-16 10:14:49 +00:00
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
2020-07-02 06:35:24 +00:00
--mount type=bind,src=/dfs/yao-jobs/,dst=/dfs/yao-jobs/ \
2019-04-16 10:14:49 +00:00
quickdeploy/yao-agent