Merge pull request #779 from akuker/akuker-precache-pip

Download and cache pip packages as part of easyinstall
This commit is contained in:
Daniel Markstedt 2022-07-30 23:38:20 -07:00 committed by GitHub
commit 4b874ab135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -83,6 +83,15 @@ function installPackages() {
sudo apt-get update && sudo apt-get install git libspdlog-dev libpcap-dev genisoimage python3 python3-venv python3-dev python3-pip nginx libpcap-dev protobuf-compiler bridge-utils libev-dev libevdev2 -y </dev/null
}
# cache the pip packages
function cachePipPackages(){
pushd $WEB_INSTALL_PATH
# Refresh the sudo authentication, which shouldn't trigger another password prompt
sudo -v
sudo pip install -r ./requirements.txt
popd
}
# compile the RaSCSI binaries
function compileRaScsi() {
cd "$BASE/src/raspberrypi" || exit 1
@ -1060,6 +1069,7 @@ function runChoice() {
echo "Detected rascsi control board service; will run the installation steps for the control board ui."
installRaScsiCtrlBoard
fi
cachePipPackages
installRaScsiWebInterface
installWebInterfaceService
showRaScsiScreenStatus
@ -1190,6 +1200,7 @@ function runChoice() {
createCfgDir
installPackages
preparePythonCommon
cachePipPackages
installRaScsiWebInterface
echo "Configuring RaSCSI Web Interface stand-alone - Complete!"
echo "Launch the Web Interface with the 'start.sh' script. To use a custom port for the web server: 'start.sh --web-port=8081"