mirror of
https://github.com/clearml/clearml-agent
synced 2025-04-22 15:14:45 +00:00
rename to sync_extra_args and set UV_CACHE_DIR
This commit is contained in:
parent
3d06b410c4
commit
16a6701d2a
@ -3453,8 +3453,6 @@ class Worker(ServiceCommandSection):
|
|||||||
self.uv.initialize(cwd=lockfile_path)
|
self.uv.initialize(cwd=lockfile_path)
|
||||||
api = self.uv.get_api(lockfile_path)
|
api = self.uv.get_api(lockfile_path)
|
||||||
if api.enabled:
|
if api.enabled:
|
||||||
# TODO: what should this be? This controls where uv installs its venv
|
|
||||||
os.environ["UV_PROJECT_ENVIRONMENT"] = None
|
|
||||||
print('UV Enabled: Ignoring requested python packages, using repository uv lock file!')
|
print('UV Enabled: Ignoring requested python packages, using repository uv lock file!')
|
||||||
api.install()
|
api.install()
|
||||||
return api
|
return api
|
||||||
|
@ -73,8 +73,12 @@ class UvConfig:
|
|||||||
kwargs["env"]["PATH"] = path
|
kwargs["env"]["PATH"] = path
|
||||||
|
|
||||||
if self.session and self.session.config and args and args[0] == "sync":
|
if self.session and self.session.config and args and args[0] == "sync":
|
||||||
|
# Set the cache dir to venvs dir
|
||||||
|
if (cache_dir := self.session.config.get("agent.venvs_dir", None)) is not None:
|
||||||
|
os.environ["UV_CACHE_DIR"] = cache_dir
|
||||||
|
|
||||||
extra_args = self.session.config.get(
|
extra_args = self.session.config.get(
|
||||||
"agent.package_manager.uv_install_extra_args", None
|
"agent.package_manager.uv_sync_extra_args", None
|
||||||
)
|
)
|
||||||
if extra_args:
|
if extra_args:
|
||||||
args = args + tuple(extra_args)
|
args = args + tuple(extra_args)
|
||||||
|
Loading…
Reference in New Issue
Block a user