You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by abhi1693 March 7, 2024
What is the best way to install additional dependencies into the container so that it persists across reboots?
As requested by @abhi1693, it's a good enhancement for this project to add support for additional dependencies.
The main idea is to be able to install python packages when the container starts before running salt-master so modules that require extra packages can fulfill their requirements.
Two approaches can be taken:
Install dependencies providing a requirements.txt file
Specify python packages using an environment variable
Both approaches can be implemented. Since one method can be more suitable than the other depending each configuration.
I think we can use the environment variables PYTHON_PACKAGES_FILE and PYTHON_PACKAGES to specify the requirements.txt file and a list of packages, respectively.
Allowing both systems at the same time can be confusing, so the first one will take priority over the second one. So, when the env variable PYTHON_PACKAGES_FILE is defined, PYTHON_PACKAGES will be ignored.
PYTHON_PACKAGES will be directly forwarded to the pip install command. So, as long it respects pip install format, all pip functionality will be supported.
The text was updated successfully, but these errors were encountered:
I think I would prefer requirements.txt. So, if I understand correctly, the entrypoint will read this file and invoke salt-pip install <pkg> on startup? Salt packages its own python if I'm not wrong so running salt-pip seems more preferable than pip install to me.
I think I would prefer requirements.txt. So, if I understand correctly, the entrypoint will read this file and invoke salt-pip install <pkg> on startup? Salt packages its own python if I'm not wrong so running salt-pip seems more preferable than pip install to me.
Discussed in #233
Originally posted by abhi1693 March 7, 2024
What is the best way to install additional dependencies into the container so that it persists across reboots?
As requested by @abhi1693, it's a good enhancement for this project to add support for additional dependencies.
The main idea is to be able to install python packages when the container starts before running
salt-master
so modules that require extra packages can fulfill their requirements.Two approaches can be taken:
Both approaches can be implemented. Since one method can be more suitable than the other depending each configuration.
I think we can use the environment variables
PYTHON_PACKAGES_FILE
andPYTHON_PACKAGES
to specify the requirements.txt file and a list of packages, respectively.Allowing both systems at the same time can be confusing, so the first one will take priority over the second one. So, when the env variable
PYTHON_PACKAGES_FILE
is defined,PYTHON_PACKAGES
will be ignored.PYTHON_PACKAGES
will be directly forwarded to thepip install
command. So, as long it respectspip install
format, all pip functionality will be supported.The text was updated successfully, but these errors were encountered: