mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 09:06:52 +00:00
Fix venv cache support for local folders
This commit is contained in:
parent
2006ab20dd
commit
9c257858dd
@ -1742,11 +1742,14 @@ class Worker(ServiceCommandSection):
|
|||||||
base_interpreter=package_api.requirements_manager.get_interpreter(),
|
base_interpreter=package_api.requirements_manager.get_interpreter(),
|
||||||
requirement_substitutions=[OnlyExternalRequirements]
|
requirement_substitutions=[OnlyExternalRequirements]
|
||||||
)
|
)
|
||||||
|
package_api.cwd = vcs.location if vcs and vcs.location else directory
|
||||||
# make sure we run the handlers
|
# make sure we run the handlers
|
||||||
cached_requirements = \
|
cached_requirements = \
|
||||||
{k: package_api.requirements_manager.replace(requirements[k] or '')
|
{k: package_api.requirements_manager.replace(requirements[k] or '')
|
||||||
for k in requirements}
|
for k in requirements}
|
||||||
package_api.load_requirements(cached_requirements)
|
if str(cached_requirements.get('pip', '')).strip() \
|
||||||
|
or str(cached_requirements.get('conda', '')).strip():
|
||||||
|
package_api.load_requirements(cached_requirements)
|
||||||
|
|
||||||
elif not is_cached and not standalone_mode:
|
elif not is_cached and not standalone_mode:
|
||||||
self.install_requirements(
|
self.install_requirements(
|
||||||
|
Loading…
Reference in New Issue
Block a user