mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 00:56:53 +00:00
Fix do not cache venv cache if venv/python skip env var was set
This commit is contained in:
parent
f877aa96e2
commit
b21665ed6e
@ -3360,8 +3360,12 @@ class Worker(ServiceCommandSection):
|
|||||||
# disable caching with poetry because we cannot make it install into a specific folder
|
# disable caching with poetry because we cannot make it install into a specific folder
|
||||||
# Todo: add support for poetry caching
|
# Todo: add support for poetry caching
|
||||||
if not self.poetry.enabled:
|
if not self.poetry.enabled:
|
||||||
|
# disable caching if we skipped the venv creation or the entire python setup
|
||||||
|
if add_venv_folder_cache and not self._standalone_mode and (
|
||||||
|
not ENV_AGENT_SKIP_PIP_VENV_INSTALL.get() and
|
||||||
|
not ENV_AGENT_SKIP_PYTHON_ENV_INSTALL.get()
|
||||||
|
):
|
||||||
# add to cache
|
# add to cache
|
||||||
if add_venv_folder_cache and not self._standalone_mode:
|
|
||||||
self.package_api.add_cached_venv(
|
self.package_api.add_cached_venv(
|
||||||
requirements=[freeze, previous_reqs],
|
requirements=[freeze, previous_reqs],
|
||||||
docker_cmd=execution_info.docker_cmd if execution_info else None,
|
docker_cmd=execution_info.docker_cmd if execution_info else None,
|
||||||
|
Loading…
Reference in New Issue
Block a user