mirror of https://github.com/skygpu/skynet.git
Snappier dgpu, fix captioning & gitignores
parent
c26b4fc468
commit
1494e47b34
|
@ -7,3 +7,7 @@ secrets
|
||||||
*.egg-info
|
*.egg-info
|
||||||
**/*.key
|
**/*.key
|
||||||
**/*.cert
|
**/*.cert
|
||||||
|
docs
|
||||||
|
ipfs-docker-data
|
||||||
|
ipfs-docker-staging
|
||||||
|
weights
|
||||||
|
|
|
@ -21,7 +21,7 @@ from leap.sugar import get_container, collect_stdout
|
||||||
from leap.hyperion import HyperionAPI
|
from leap.hyperion import HyperionAPI
|
||||||
|
|
||||||
from .db import open_new_database
|
from .db import open_new_database
|
||||||
from .ipfs import IPFSDocker
|
from .ipfs import open_ipfs_node
|
||||||
from .config import *
|
from .config import *
|
||||||
from .nodeos import open_cleos, open_nodeos
|
from .nodeos import open_cleos, open_nodeos
|
||||||
from .constants import ALGOS
|
from .constants import ALGOS
|
||||||
|
@ -396,6 +396,13 @@ class IPFSHTTP:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@run.command()
|
||||||
|
@click.option('--loglevel', '-l', default='INFO', help='logging level')
|
||||||
|
@click.option('--name', '-n', default='skynet-ipfs', help='container name')
|
||||||
|
def ipfs(loglevel, name):
|
||||||
|
with open_ipfs_node(name=name):
|
||||||
|
...
|
||||||
|
|
||||||
@run.command()
|
@run.command()
|
||||||
@click.option('--loglevel', '-l', default='INFO', help='logging level')
|
@click.option('--loglevel', '-l', default='INFO', help='logging level')
|
||||||
@click.option(
|
@click.option(
|
||||||
|
|
|
@ -222,7 +222,8 @@ async def open_dgpu_node(
|
||||||
'telos.gpu',
|
'telos.gpu',
|
||||||
'workbegin',
|
'workbegin',
|
||||||
[account, request_id],
|
[account, request_id],
|
||||||
f'{account}@{permission}'
|
f'{account}@{permission}',
|
||||||
|
retry=0
|
||||||
)
|
)
|
||||||
|
|
||||||
def cancel_work(request_id: int, reason: str):
|
def cancel_work(request_id: int, reason: str):
|
||||||
|
@ -231,7 +232,8 @@ async def open_dgpu_node(
|
||||||
'telos.gpu',
|
'telos.gpu',
|
||||||
'workcancel',
|
'workcancel',
|
||||||
[account, request_id, reason],
|
[account, request_id, reason],
|
||||||
f'{account}@{permission}'
|
f'{account}@{permission}',
|
||||||
|
retry=2
|
||||||
)
|
)
|
||||||
|
|
||||||
def maybe_withdraw_all():
|
def maybe_withdraw_all():
|
||||||
|
@ -283,7 +285,8 @@ async def open_dgpu_node(
|
||||||
'telos.gpu',
|
'telos.gpu',
|
||||||
'submit',
|
'submit',
|
||||||
[account, request_id, request_hash, result_hash, ipfs_hash],
|
[account, request_id, request_hash, result_hash, ipfs_hash],
|
||||||
f'{account}@{permission}'
|
f'{account}@{permission}',
|
||||||
|
retry=0
|
||||||
)
|
)
|
||||||
|
|
||||||
if ec != 0:
|
if ec != 0:
|
||||||
|
|
|
@ -57,7 +57,7 @@ def prepare_metainfo_caption(tguser, worker: str, reward: str, meta: dict) -> st
|
||||||
else:
|
else:
|
||||||
user = f'{tguser.first_name} id: {tguser.id}'
|
user = f'{tguser.first_name} id: {tguser.id}'
|
||||||
|
|
||||||
meta_str = f'<u>by {user}</u>'
|
meta_str = f'<u>by {user}</u>\n'
|
||||||
meta_str += f'<i>performed by {worker}</i>\n'
|
meta_str += f'<i>performed by {worker}</i>\n'
|
||||||
meta_str += f'<b><u>reward: {reward}</u></b>\n'
|
meta_str += f'<b><u>reward: {reward}</u></b>\n'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue