Skip to content

Commit

Permalink
docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
latentvector committed May 18, 2024
1 parent 8892e64 commit eb88ea5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions commune/module/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -7654,9 +7654,11 @@ def docker_compose_file(self, *args, **kwargs):
return x

@classmethod
def launcher_keys(cls):
def launcher_keys(cls, netuid=0, min_stake=500, **kwargs):
keys = c.keys()
return [k for k in keys if k.startswith('module::')]
key2balance = c.key2balance(**kwargs)
key2balance = {k: v for k,v in key2balance.items() if v > min_stake}
return [k for k in keys]

@classmethod
def top_launchers(cls, amount=600, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion commune/tree/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def path2simple(cls, path:str, ignore_prefixes = ['commune', 'modules', 'commune
path = path.replace(c.libpath, '')
elif path.startswith(pwd):
path = path.replace(pwd, '')

if cls.path_config_exists(path):
simple_path = os.path.dirname(simple_path)
else:
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ services:
container_name: commune
shm_size: '1gb' # for the shared memory size
volumes:
- ~/.commune:/config/.commune
- ./:/commune
- ~/.commune:/config/.commune # mount the temporary folder
- ./:/commune # mount the current directory
- /var/run/docker.sock:/var/run/docker.sock # allow for docker to talk to deamon in outside
ports:
#
- 50050-50250:50050-50250

restart: unless-stopped

0 comments on commit eb88ea5

Please sign in to comment.