Use an external pip server¶
If your python package is available on the public pip repository you can simply add that package to your requirements.txt
. In some cases you need an external repository instead. There are two ways of doing this.
Adding an extra index url¶
One thing you can do is add an extra pip repository to your configuration. This way pip will search for the package in both repositories.
You can do this by adding the following to your ubiops.yaml configuration file.
environment_variables:
- PIP_EXTRA_INDEX_URL=http://d.pypi.python.org/simple
Then simply add the package name to the requirements.txt like you normally would.
ubiops===3.8.0
Duplicate package names
The only problem with this is that pip cannot really handle packages from 2 different indexes with the same name.
Adding package links to requirements.txt¶
The second method is to add the complete package url to the requirements.txt file.
For example:
https://files.pythonhosted.org/packages/8c/26/1cd0728c23084834c2460118b2e7306e9aea9454694bb33390c0d3616890/pandas-1.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl