mirror of
https://github.com/clearml/clearml-agent
synced 2025-06-26 18:16:15 +00:00
Add agent.package_manager.poetry_install_extra_args configuration option
This commit is contained in:
parent
afffa83063
commit
154db59ce6
@ -69,6 +69,7 @@
|
|||||||
pip_version: ["<20.2 ; python_version < '3.10'", "<22.3 ; python_version >= '3.10'"],
|
pip_version: ["<20.2 ; python_version < '3.10'", "<22.3 ; python_version >= '3.10'"],
|
||||||
# specify poetry version to use (examples "<2", "==1.1.1", "", empty string will install the latest version)
|
# specify poetry version to use (examples "<2", "==1.1.1", "", empty string will install the latest version)
|
||||||
# poetry_version: "<2",
|
# poetry_version: "<2",
|
||||||
|
# poetry_install_extra_args: ["-v"]
|
||||||
|
|
||||||
# virtual environment inherits packages from system
|
# virtual environment inherits packages from system
|
||||||
system_site_packages: false,
|
system_site_packages: false,
|
||||||
|
@ -69,6 +69,11 @@ class PoetryConfig:
|
|||||||
path = path.replace(':'+sys.base_prefix, ':'+sys.real_prefix, 1)
|
path = path.replace(':'+sys.base_prefix, ':'+sys.real_prefix, 1)
|
||||||
kwargs['env']['PATH'] = path
|
kwargs['env']['PATH'] = path
|
||||||
|
|
||||||
|
if self.session and self.session.config:
|
||||||
|
extra_args = self.session.config.get("agent.package_manager.poetry_install_extra_args", None)
|
||||||
|
if extra_args:
|
||||||
|
args = args + tuple(extra_args)
|
||||||
|
|
||||||
if check_if_command_exists("poetry"):
|
if check_if_command_exists("poetry"):
|
||||||
argv = Argv("poetry", *args)
|
argv = Argv("poetry", *args)
|
||||||
else:
|
else:
|
||||||
|
@ -82,6 +82,7 @@ agent {
|
|||||||
# pip_version: ["<20.2 ; python_version < '3.10'", "<22.3 ; python_version >= '3.10'"]
|
# pip_version: ["<20.2 ; python_version < '3.10'", "<22.3 ; python_version >= '3.10'"]
|
||||||
# specify poetry version to use (examples "<2", "==1.1.1", "", empty string will install the latest version)
|
# specify poetry version to use (examples "<2", "==1.1.1", "", empty string will install the latest version)
|
||||||
# poetry_version: "<2",
|
# poetry_version: "<2",
|
||||||
|
# poetry_install_extra_args: ["-v"]
|
||||||
|
|
||||||
# virtual environment inheres packages from system
|
# virtual environment inheres packages from system
|
||||||
system_site_packages: false,
|
system_site_packages: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user