From 120146a1968ee3eabe2e9df0f8a87b682ab6569c Mon Sep 17 00:00:00 2001 From: Tony Kuker Date: Fri, 28 Apr 2023 02:49:54 +0000 Subject: [PATCH] #1149 install packages from local cache --- python/web/start.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/web/start.sh b/python/web/start.sh index 44a6ebedb8..d012852ac7 100755 --- a/python/web/start.sh +++ b/python/web/start.sh @@ -59,8 +59,9 @@ if ! test -e venv; then echo "Activating venv" source venv/bin/activate echo "Installing requirements.txt" - pip3 install wheel - pip3 install -r requirements.txt + pip3 install wheel --no-index --find-links=$HOME/.pip_cache + # Reference: https://pip.pypa.io/en/latest/user_guide/#installing-from-local-packages + pip3 install -r requirements.txt --no-index --find-links=$HOME/.pip_cache if git rev-parse --is-inside-work-tree &> /dev/null; then git rev-parse HEAD > current @@ -79,7 +80,7 @@ if [[ $? -eq 0 ]]; then git rev-parse > current elif [ "$(cat current)" != "$(git rev-parse HEAD)" ]; then echo "New version detected, updating libraries from requirements.txt" - pip3 install -r requirements.txt + pip3 install -r requirements.txt --no-index --find-links=$HOME/.pip_cache git rev-parse HEAD > current fi else