mirror of
https://github.com/exo-explore/exo.git
synced 2026-05-19 04:05:23 -04:00
create directory on startup (#2089)
## Motivation <!-- Why is this change needed? What problem does it solve? --> <!-- If it fixes an open issue, please link to the issue here --> When you first run `uv run exo` you get an error like : `FileNotFoundError: [Errno 2] No such file or directory: '/Users/heidar/.exo/models'` Manually tested on Macbook Pro M1 32GB Fixes issue - https://github.com/exo-explore/exo/issues/2090
This commit is contained in:
@@ -18,7 +18,7 @@ from exo.download.impl_shard_downloader import exo_shard_downloader
|
||||
from exo.master.main import Master
|
||||
from exo.routing.event_router import EventRouter
|
||||
from exo.routing.router import Router, get_node_id_keypair
|
||||
from exo.shared.constants import EXO_LOG
|
||||
from exo.shared.constants import EXO_DEFAULT_MODELS_DIR, EXO_LOG
|
||||
from exo.shared.election import Election, ElectionResult
|
||||
from exo.shared.logging import logger_cleanup, logger_setup
|
||||
from exo.shared.types.common import NodeId, SessionId
|
||||
@@ -71,6 +71,9 @@ class Node:
|
||||
|
||||
logger.info(f"Starting node {node_id}")
|
||||
|
||||
# Errors the very first time exo is run as dir doesn't exist
|
||||
EXO_DEFAULT_MODELS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Create DownloadCoordinator (unless --no-downloads)
|
||||
if not args.no_downloads:
|
||||
download_coordinator = DownloadCoordinator(
|
||||
|
||||
Reference in New Issue
Block a user