|
@@ -74,6 +74,7 @@ usage() {
|
|
|
echo " --enable-api[port=PORT] Enable API and expose it on the specified port."
|
|
|
echo " --webui[port=PORT] Set the port for the web user interface."
|
|
|
echo " --data[folder=PATH] Bind mount for ollama data folder (by default will create the 'ollama' volume)."
|
|
|
+ echo " --playwright Enable Playwright support for web scraping."
|
|
|
echo " --build Build the docker image before running the compose project."
|
|
|
echo " --drop Drop the compose project."
|
|
|
echo " -q, --quiet Run script in headless mode."
|
|
@@ -100,6 +101,7 @@ webui_port=3000
|
|
|
headless=false
|
|
|
build_image=false
|
|
|
kill_compose=false
|
|
|
+enable_playwright=false
|
|
|
|
|
|
# Function to extract value from the parameter
|
|
|
extract_value() {
|
|
@@ -129,6 +131,9 @@ while [[ $# -gt 0 ]]; do
|
|
|
value=$(extract_value "$key")
|
|
|
data_dir=${value:-"./ollama-data"}
|
|
|
;;
|
|
|
+ --playwright)
|
|
|
+ enable_playwright=true
|
|
|
+ ;;
|
|
|
--drop)
|
|
|
kill_compose=true
|
|
|
;;
|
|
@@ -182,6 +187,9 @@ else
|
|
|
DEFAULT_COMPOSE_COMMAND+=" -f docker-compose.data.yaml"
|
|
|
export OLLAMA_DATA_DIR=$data_dir # Set OLLAMA_DATA_DIR environment variable
|
|
|
fi
|
|
|
+ if [[ $enable_playwright == true ]]; then
|
|
|
+ DEFAULT_COMPOSE_COMMAND+=" -f docker-compose.playwright.yaml"
|
|
|
+ fi
|
|
|
if [[ -n $webui_port ]]; then
|
|
|
export OPEN_WEBUI_PORT=$webui_port # Set OPEN_WEBUI_PORT environment variable
|
|
|
fi
|
|
@@ -201,6 +209,7 @@ echo -e " ${GREEN}${BOLD}GPU Count:${NC} ${OLLAMA_GPU_COUNT:-Not Enabled}"
|
|
|
echo -e " ${GREEN}${BOLD}WebAPI Port:${NC} ${OLLAMA_WEBAPI_PORT:-Not Enabled}"
|
|
|
echo -e " ${GREEN}${BOLD}Data Folder:${NC} ${data_dir:-Using ollama volume}"
|
|
|
echo -e " ${GREEN}${BOLD}WebUI Port:${NC} $webui_port"
|
|
|
+echo -e " ${GREEN}${BOLD}Playwright:${NC} ${enable_playwright:-false}"
|
|
|
echo
|
|
|
|
|
|
if [[ $headless == true ]]; then
|