mirror of
https://github.com/clearml/clearml-agent
synced 2025-06-09 07:57:13 +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.stdout.flush()
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
os.chdir(script_dir)
|
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:])
|
os.execv(command.argv[0].as_posix(), tuple([command.argv[0].as_posix()])+command.argv[1:])
|
||||||
else:
|
else:
|
||||||
exit_code = command.check_call(cwd=script_dir)
|
exit_code = command.check_call(cwd=script_dir)
|
||||||
@ -1414,6 +1414,7 @@ class Worker(ServiceCommandSection):
|
|||||||
self.poetry.initialize(cwd=repo_info.root)
|
self.poetry.initialize(cwd=repo_info.root)
|
||||||
api = self.poetry.get_api(repo_info.root)
|
api = self.poetry.get_api(repo_info.root)
|
||||||
if api.enabled:
|
if api.enabled:
|
||||||
|
print('Poetry Enabled: Ignoring requested python packages, using repository poetry lock file!')
|
||||||
api.install()
|
api.install()
|
||||||
return api
|
return api
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -249,9 +249,6 @@ class PytorchRequirement(SimpleSubstitution):
|
|||||||
return url
|
return url
|
||||||
|
|
||||||
def get_url_for_platform(self, req):
|
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
|
# check if package is already installed with system packages
|
||||||
try:
|
try:
|
||||||
if self.config.get("agent.package_manager.system_site_packages"):
|
if self.config.get("agent.package_manager.system_site_packages"):
|
||||||
|
Loading…
Reference in New Issue
Block a user