added local catch for EFS OS/permissions issues

This commit is contained in:
GokuMohandas
2023-12-07 11:34:26 -08:00
parent 540754392a
commit 11ab35b251
7 changed files with 447 additions and 394 deletions

View File

@@ -11,6 +11,11 @@ ROOT_DIR = Path(__file__).parent.parent.absolute()
LOGS_DIR = Path(ROOT_DIR, "logs")
LOGS_DIR.mkdir(parents=True, exist_ok=True)
EFS_DIR = Path(f"/efs/shared_storage/madewithml/{os.environ.get('GITHUB_USERNAME', '')}")
try:
Path(EFS_DIR).mkdir(parents=True, exist_ok=True)
except OSError:
EFS_DIR = Path(ROOT_DIR, "efs")
Path(EFS_DIR).mkdir(parents=True, exist_ok=True)
# Config MLflow
MODEL_REGISTRY = Path(f"{EFS_DIR}/mlflow")