mirror of
https://github.com/clearml/clearml-agent
synced 2025-03-03 10:42:05 +00:00
Fix poetry support (issue #57)
This commit is contained in:
parent
948fc4c6ce
commit
60a58f6fad
@ -2242,6 +2242,9 @@ class Worker(ServiceCommandSection):
|
||||
except Exception:
|
||||
requirements = freeze
|
||||
|
||||
# disable caching with poetry because we cannot make it install into a specific folder
|
||||
# Todo: add support for poetry caching
|
||||
if not self.poetry.enabled:
|
||||
# add to cache
|
||||
print('Adding venv into cache: {}'.format(add_venv_folder_cache))
|
||||
if add_venv_folder_cache:
|
||||
@ -2310,7 +2313,11 @@ class Worker(ServiceCommandSection):
|
||||
package_api.cwd = cwd
|
||||
api = self._install_poetry_requirements(repo_info)
|
||||
if api:
|
||||
package_api = api
|
||||
# update back the package manager, this hack should be fixed
|
||||
if package_api == self.package_api:
|
||||
self.package_api = api
|
||||
elif package_api == self.global_package_api:
|
||||
self.global_package_api = api
|
||||
return
|
||||
|
||||
package_api.upgrade_pip()
|
||||
|
Loading…
Reference in New Issue
Block a user