bentoml bulid镜象太慢,更换国内pip源
Published on Aug. 22, 2023, 12:10 p.m.
bentoml bulid镜象太慢,原因在于国外源pip太慢,改下 bentoml-init.sh文件里对应的国内源即可。
修改 bentoml-init.sh
62行
# Install PyPI packages specified in requirements.txt
if [ $# -eq 0 ] || [ $1 == "install_pip_packages" ] ; then
pip install -i https://pypi.doubanio.com/simple/ -r ./requirements.txt --no-cache-dir $EXTRA_PIP_INSTALL_ARGS
fi
方案2
bentoml containerize IrisClassifier:latest -t iris-classifier –build-arg EXTRA_PIP_INSTALL_ARGS=–extra-index-url=https://pypi.doubanio.com/simple/