BentoML icon indicating copy to clipboard operation
BentoML copied to clipboard

feature: not able to install packages from private PyPI easily

Open michaelromagne opened this issue 1 year ago • 3 comments
trafficstars

Feature request

It would be great to propose an easy way to mount config files like .netrc before installing deps from a requirements.txt file

Motivation

I am not able to install packages from a private PYPI.

I can provide environment variable in my bentofile.yaml and a requirements.txt file but I can not mount my .netrc file.

The only way to install from a private PyPI is to put the .netrc file in the include section of the bentofile.yaml, it will be copied in /src folder. Then in the Dockerfile.template I copy it to /home/bentoml, and lastly pip install my package from my private PyPI, which is not great.

It would be better to propose an easy way to mount config files like .netrc

Other

No response

michaelromagne avatar Dec 07 '23 22:12 michaelromagne

You need to add this to index_url to https://docs.bentoml.com/en/latest/concepts/bento.html#python-options-table in the bentofile.yaml.

aarnphm avatar Dec 12 '23 05:12 aarnphm

Thanks for your answer @aarnphm . I can provide the extra index url in index_url but not mount the .netrc file I think

michaelromagne avatar Dec 12 '23 10:12 michaelromagne

If you want to mount a .netrc you can do it on the container.

Not sure how it would work in kubernetes tho. probably better to use secrets in kubernetes.

aarnphm avatar Dec 13 '23 13:12 aarnphm