mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
* Remove restating comments in backend * Remove restating comments in frontend stories * Remove restating comments in pipeline * Remove restating comments in pipeline scripts * Restore location-clear comment in BreweryRepository * Remove stale/restating comments found in second pass * Restore mock curated-data branch comment in main.cc * Remove more restating/filler comments in backend * Document account-management endpoints, compose files, and env generator * Squashed commit of the following: commit a8a5b8abd9969859c695092fae6990d03b2135ed Author: Aaron Po <aaron.po97@gmail.com> Date: Sun Aug 23 23:53:56 2026 -0400 Add reverse geocoding for brewery street addresses (#245) * Add geocoding to seed application, remove postal codes from generator Update comments * Update pipeline class diagram for OpenAI generator * Update pipeline activity diagram for brewery coordinates and OpenAI backend * Add mailpit, production, db-only, and minimal environments to deployment diagram * Fix authentication flow diagram for Identity migration * Add account-management flows to authentication diagram * Fix database schema diagram note referencing removed AuthRepository
52 lines
1.6 KiB
Bash
52 lines
1.6 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
MODEL_PATH="${BIERGARTEN_MODEL_PATH:-/workspace/models/google_gemma-4-E4B-it-Q6_K.gguf}"
|
|
OUTPUT_DIR="${BIERGARTEN_OUTPUT_DIR:-/workspace/output}"
|
|
LOG_PATH="${BIERGARTEN_LOG_PATH:-/workspace/logs/pipeline.log}"
|
|
EXECUTABLE="/app/build/biergarten-pipeline"
|
|
PROMPT_DIR="/app/prompts"
|
|
|
|
echo "--- Starting Biergarten Pipeline Environment Check ---"
|
|
|
|
mkdir -p "$OUTPUT_DIR"
|
|
mkdir -p "$(dirname "$LOG_PATH")"
|
|
mkdir -p "$(dirname "$MODEL_PATH")"
|
|
|
|
if [ ! -f "$MODEL_PATH" ]; then
|
|
echo "Model not found. Downloading (this may take a while)..."
|
|
|
|
curl -L -C - \
|
|
-o "$MODEL_PATH" \
|
|
"https://huggingface.co/bartowski/google_gemma-4-E4B-it-GGUF/resolve/main/google_gemma-4-E4B-it-Q6_K.gguf?download=true"
|
|
|
|
echo "Download complete."
|
|
fi
|
|
|
|
if [ ! -f "$MODEL_PATH" ]; then
|
|
echo "ERROR: Model still not found after download attempt."
|
|
exit 1
|
|
fi
|
|
|
|
GL_LAYERS="${BIERGARTEN_GL_LAYERS:-40}"
|
|
|
|
ARGS=(
|
|
"--model" "$MODEL_PATH"
|
|
"--prompt-dir" "$PROMPT_DIR"
|
|
"--output" "$OUTPUT_DIR"
|
|
"--log-path" "$LOG_PATH"
|
|
"--n-gpu-layers" "$GL_LAYERS"
|
|
)
|
|
|
|
[[ -n "$BIERGARTEN_TEMPERATURE" ]] && ARGS+=("--temperature" "$BIERGARTEN_TEMPERATURE")
|
|
[[ -n "$BIERGARTEN_TOP_P" ]] && ARGS+=("--top-p" "$BIERGARTEN_TOP_P")
|
|
[[ -n "$BIERGARTEN_TOP_K" ]] && ARGS+=("--top-k" "$BIERGARTEN_TOP_K")
|
|
[[ -n "$BIERGARTEN_N_CTX" ]] && ARGS+=("--n-ctx" "$BIERGARTEN_N_CTX")
|
|
[[ -n "$BIERGARTEN_SEED" ]] && ARGS+=("--seed" "$BIERGARTEN_SEED")
|
|
|
|
[[ -n "$BIERGARTEN_EXTRA_ARGS" ]] && ARGS+=($BIERGARTEN_EXTRA_ARGS)
|
|
|
|
echo "--- Executing: $EXECUTABLE ${ARGS[*]} ---"
|
|
|
|
exec "$EXECUTABLE" "${ARGS[@]}"
|