mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-06-07 22:01:55 +00:00
all in one
This commit is contained in:
parent
caccd74462
commit
cd789c386a
4
main.py
4
main.py
@ -131,7 +131,7 @@ class MyHandler(BaseHTTPRequestHandler):
|
||||
try:
|
||||
script = " ".join([
|
||||
"docker run",
|
||||
"--gpus '\\'\\\"device=" + docker_gpus + "\\\"$'\\'",
|
||||
"--gpus '\"device=" + docker_gpus + "\"'",
|
||||
"--detach=True",
|
||||
"--hostname " + docker_name,
|
||||
"--network " + docker_network,
|
||||
@ -143,7 +143,7 @@ class MyHandler(BaseHTTPRequestHandler):
|
||||
docker_cmd
|
||||
])
|
||||
|
||||
print('sh -c ' + '\'' + script + '\'')
|
||||
print(script)
|
||||
|
||||
client = docker.from_env()
|
||||
container = client.containers.get('yao-agent-helper')
|
||||
|
Loading…
Reference in New Issue
Block a user