Skip to content

Commit

Permalink
Look up requirements paths via python package path
Browse files Browse the repository at this point in the history
instead of assuming a specific file prefix.

Connected to PLAT-566
  • Loading branch information
meatballhat committed Dec 17, 2024
1 parent c8d80f4 commit 66a5fc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/monobase/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from monobase.prune import clean_uv_cache, prune_cuda, prune_old_gen, prune_uv_cache
from monobase.user import build_user_venv
from monobase.util import (
HERE,
IN_KUBERNETES,
NODE_FEATURE_LABEL_FILE,
Version,
Expand Down Expand Up @@ -151,7 +152,7 @@ def build_generation(args: argparse.Namespace, mg: MonoGen) -> None:
log.info(f'CuDNN symlinked in {dst}')

suffix = '' if args.environment == 'prod' else f'-{args.environment}'
rdir = os.path.join('/opt/r8/monobase', f'requirements{suffix}', f'g{mg.id:05d}')
rdir = os.path.join(HERE, f'requirements{suffix}', f'g{mg.id:05d}')
for (p, pf), t, c in itertools.product(
desc_version_key(mg.python),
desc_version(mg.torch),
Expand Down
1 change: 1 addition & 0 deletions src/monobase/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

tracer = trace.get_tracer('monobase')

HERE = os.path.dirname(os.path.abspath(__file__))
IN_KUBERNETES = os.environ.get('KUBERNETES_SERVICE_HOST') is not None
NODE_FEATURE_LABEL_FILE = '/etc/kubernetes/node-feature-discovery/features.d/monobase'
DONE_FILE_BASENAME = '.done'
Expand Down

0 comments on commit 66a5fc9

Please sign in to comment.