mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 09:06:52 +00:00
Fix poetry support
This commit is contained in:
parent
599219b02d
commit
06897f7606
@ -1164,7 +1164,7 @@ class Worker(ServiceCommandSection):
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
os.chdir(script_dir)
|
||||
if not is_windows_platform():
|
||||
if not is_windows_platform() and not isinstance(self.package_api, PoetryAPI):
|
||||
os.execv(command.argv[0].as_posix(), tuple([command.argv[0].as_posix()])+command.argv[1:])
|
||||
else:
|
||||
exit_code = command.check_call(cwd=script_dir)
|
||||
@ -1414,6 +1414,7 @@ class Worker(ServiceCommandSection):
|
||||
self.poetry.initialize(cwd=repo_info.root)
|
||||
api = self.poetry.get_api(repo_info.root)
|
||||
if api.enabled:
|
||||
print('Poetry Enabled: Ignoring requested python packages, using repository poetry lock file!')
|
||||
api.install()
|
||||
return api
|
||||
except Exception:
|
||||
|
@ -249,9 +249,6 @@ class PytorchRequirement(SimpleSubstitution):
|
||||
return url
|
||||
|
||||
def get_url_for_platform(self, req):
|
||||
assert self.package_manager == "pip"
|
||||
assert self.os != "mac"
|
||||
|
||||
# check if package is already installed with system packages
|
||||
try:
|
||||
if self.config.get("agent.package_manager.system_site_packages"):
|
||||
|
Loading…
Reference in New Issue
Block a user