Use secure, private, local PyPI repositories to share PyPI packages across your organization with fine-grained access control
Generate Artificatory Cloud credentials
- Go to your JFrog Cloud Platform
- Navigate to Repositories
- Select Set Up Client/CI Tool on your PyPI repository
- Copy the value of the
index-url
(starting withhttp://
)
Save credentials in Valohai
- Go to your organization or project settings
- Open the Environment Variables tab
- Add a entry with the name
private_pypi_index_url
and paste the value you copied in the previous step. Save the value as a secret by tapping on the key icon.
Authenticate with the private PyPI repository
There are many different ways to authenticate with the private PyPI repository, as described in JFrog documentation.
In this example, we’ll simply add our private PyPI repository url to the pip configuration before running pip install in our Valohai step.
You can add this in your valohai.yaml
:
- step:
name: fetch-from-private-pypi
image: python:3.10
command:
- pip config set global.index-url $private_pypi_index_url
- pip install my-private-jfrog-package
- pip install scikit-learn