mirror of
https://github.com/clearml/clearml-agent
synced 2025-04-22 15:14:45 +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:
|
except Exception:
|
||||||
requirements = freeze
|
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
|
# add to cache
|
||||||
print('Adding venv into cache: {}'.format(add_venv_folder_cache))
|
print('Adding venv into cache: {}'.format(add_venv_folder_cache))
|
||||||
if add_venv_folder_cache:
|
if add_venv_folder_cache:
|
||||||
@ -2310,7 +2313,11 @@ class Worker(ServiceCommandSection):
|
|||||||
package_api.cwd = cwd
|
package_api.cwd = cwd
|
||||||
api = self._install_poetry_requirements(repo_info)
|
api = self._install_poetry_requirements(repo_info)
|
||||||
if api:
|
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
|
return
|
||||||
|
|
||||||
package_api.upgrade_pip()
|
package_api.upgrade_pip()
|
||||||
|
Loading…
Reference in New Issue
Block a user