|
#!/bin/bash |
|
|
|
|
|
echo "Pulling latest changes from Git repository..." |
|
git pull |
|
|
|
|
|
venv_path="zysec" |
|
if [ ! -d "$venv_path" ]; then |
|
echo "Creating virtual environment 'ZySec'..." |
|
python3 -m venv $venv_path |
|
fi |
|
|
|
echo "Activating virtual environment 'ZySec'..." |
|
source $venv_path/bin/activate |
|
|
|
|
|
if [[ "$VIRTUAL_ENV" != "" && "$VIRTUAL_ENV" == *"$venv_path" ]]; then |
|
echo "Now in the 'ZySec' virtual environment." |
|
|
|
pip3 install -r requirements.txt -q |
|
else |
|
echo "Failed to activate 'ZySec' virtual environment. Exiting." |
|
exit 1 |
|
fi |
|
|
|
|
|
echo "Assuming model instance is running.. you can start it or review settings in about section to connect to remote instance." |
|
echo "Starting Streamlit app..." |
|
streamlit run app.py |
|
|
|
|