#!/bin/bash #--- Note: this file is designed to run locally as well as within docker to prep the environment #--- Entry: this script is assumed to run from the /app root folder #--- Usage: ./_env_config/local_dev/utl_dkr_preRun.sh #--- for volume initialization; ensure folders are in place; assume: we are in the /app folder < /dev/null && pwd ) # strpth_scrHome="${strpth_scriptLoc}/../" # strpth_appHome="${strpth_scrHome}../" # strpth_scrModels="${strpth_scrHome}models/" # #echo "strpth_appHome = ${strpth_appHome}" #--- for nginx; external 7860; internal 7860 echo "INFO: starting nginx ..." # service nginx start exec nginx -g "daemon off;" # #--- for fastapi; external 49132; internal 39132 # echo "INFO: starting fastapi ..." # uvicorn --app-dir=./fastapi entry_fastapi:app --reload --workers 1 --host 0.0.0.0 --port 39132 & #--- specify a non-root app dir # #--- for streamlit; external 49131; internal 39131 # echo "INFO: starting streamlit ..." # streamlit run ./streamlit/entry_streamlit.py --server.port=39131 --server.maxUploadSize=2000 #--- & run in the background <