Context: TruEra Model Execution Environments
Executing Python models in TruEra infrastructure requires (1) the creation of a virtual environment (via conda), and (2) populating that virtual environment with your model's dependencies.
These dependencies are then used execute the model on the configured data, generating predictions and feature influences that underpin many of TruEra Diagnostics' analytics.
Default PyPi and Conda repositories
To satisfy your model's dependencies, The TruEra service that executes your model reaches out to public-facing pip & conda repos on the internet:
If you cannot successfully ping these URLs from the host that is running your deployment of TruEra, you may need to modify the default pip & conda configuration files on the host.
These modifications can include the use of proxy servers, internal channels (mirrors) of these repositories, and/or additional security configurations related to SSL communication.
Configuring custom PyPi or Conda Repo
By default TruEra ships with
.condarc files pointing to the default public repositories. In many enterprise installations, access to public repositories is blocked. In these cases, we can configure the python model runner to use local (on-premise / within the same virtual network) conda and pip repositories.
Required Information: pip & conda
- A private pip server index URL, which is used to locate the index for the pip packages.
- Privately hosted conda channel URLs.
Particular deployments might need reconfiguring other configurations as well. So we allow users to update the whole
.condarc based on their requirements.
Pip & Conda reference documentation
For more details on
pip.conf please follow:
For more details on
.condarc please follow:
With these two pieces of information, we can update the
.condarc in the deployment to point to the correct (and accessible) repositories.
Configuring in Singlebox Mode
.condarc should be copied to the
config.override directory of the installation.
Configuring in Kubernetes
.condarc are configured via K8s configmap
model-runner-python-configmap.yaml. When using
.Values.modelrunner.python.config.condarc are used as the configuration files verbatim.
Additional Configuration Examples: SSL & proxy use
SSL issues while fetching packages?
pip.conf configure the
trusted-host appropriately, example:
[install] trusted-host = pypi.org pypi.python.org files.pythonhosted.org
Configuring proxy to contact to internet
[global] proxy = <http://user>:password@proxy_name:port
proxy_servers: http: <http://user:firstname.lastname@example.org:8080> https: <https://user:email@example.com:8080>