Updated ipfs remote and ipfs launch logic

add-txt2txt-models
Guillermo Rodriguez 2023-06-03 12:44:22 -03:00
parent 13c6e85ac9
commit 006d15137c
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
3 changed files with 11 additions and 5 deletions

View File

@ -316,7 +316,7 @@ def nodeos():
@click.option( @click.option(
'--node-url', '-n', default='https://skynet.ancap.tech') '--node-url', '-n', default='https://skynet.ancap.tech')
@click.option( @click.option(
'--ipfs-url', '-n', default='/ip4/169.197.140.154/udp/4001/quic/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv') '--ipfs-url', '-n', default=DEFAULT_IPFS_REMOTE)
@click.option( @click.option(
'--algos', '-A', default=json.dumps(['midj', 'ink'])) '--algos', '-A', default=json.dumps(['midj', 'ink']))
def dgpu( def dgpu(
@ -354,11 +354,11 @@ def dgpu(
@click.option( @click.option(
'--key', '-k', default=None) '--key', '-k', default=None)
@click.option( @click.option(
'--hyperion-url', '-n', default='https://skynet.ancap.tech') '--hyperion-url', '-y', default='https://skynet.ancap.tech')
@click.option( @click.option(
'--node-url', '-n', default='https://skynet.ancap.tech') '--node-url', '-n', default='https://skynet.ancap.tech')
@click.option( @click.option(
'--ipfs-url', '-n', default='/ip4/169.197.140.154/udp/4001/quic/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv') '--ipfs-url', '-i', default=DEFAULT_IPFS_REMOTE)
@click.option( @click.option(
'--db-host', '-h', default='localhost:5432') '--db-host', '-h', default='localhost:5432')
@click.option( @click.option(
@ -427,7 +427,7 @@ def ipfs(loglevel, name):
@click.option( @click.option(
'--ipfs-rpc', '-i', default='http://127.0.0.1:5001') '--ipfs-rpc', '-i', default='http://127.0.0.1:5001')
@click.option( @click.option(
'--hyperion-url', '-n', default='http://127.0.0.1:42001') '--hyperion-url', '-y', default='http://127.0.0.1:42001')
def pinner(loglevel, ipfs_rpc, hyperion_url): def pinner(loglevel, ipfs_rpc, hyperion_url):
logging.basicConfig(level=loglevel) logging.basicConfig(level=loglevel)
ipfs_node = IPFSHTTP(ipfs_rpc) ipfs_node = IPFSHTTP(ipfs_rpc)

View File

@ -130,3 +130,5 @@ CONFIG_ATTRS = [
'strength', 'strength',
'upscaler' 'upscaler'
] ]
DEFAULT_IPFS_REMOTE = '/ip4/169.197.140.154/tcp/4001/p2p/12D3KooWKWogLFNEcNNMKnzU7Snrnuj84RZdMBg3sLiQSQc51oEv'

View File

@ -86,13 +86,17 @@ def open_ipfs_node(name='skynet-ipfs'):
Mount(export_target, str(staging_dir), 'bind'), Mount(export_target, str(staging_dir), 'bind'),
Mount(data_target, str(data_dir), 'bind') Mount(data_target, str(data_dir), 'bind')
], ],
detach=True detach=True,
remove=True
) )
uid = os.getuid() uid = os.getuid()
gid = os.getgid() gid = os.getgid()
ec, out = container.exec_run(['chown', f'{uid}:{gid}', '-R', export_target]) ec, out = container.exec_run(['chown', f'{uid}:{gid}', '-R', export_target])
logging.info(out)
assert ec == 0 assert ec == 0
ec, out = container.exec_run(['chown', f'{uid}:{gid}', '-R', data_target]) ec, out = container.exec_run(['chown', f'{uid}:{gid}', '-R', data_target])
logging.info(out)
assert ec == 0 assert ec == 0
for log in container.logs(stream=True): for log in container.logs(stream=True):