update directories

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Aaron Po
2026-05-05 00:45:08 -04:00
parent b4238cd713
commit 67c34773fa
2 changed files with 29 additions and 17 deletions

View File

@@ -5,8 +5,8 @@ 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="/workspace/app/build/biergarten-pipeline"
PROMPT_DIR="/workspace/app/prompts"
EXECUTABLE="/app/build/biergarten-pipeline"
PROMPT_DIR="/app/prompts"
echo "--- Starting Biergarten Pipeline Environment Check ---"
@@ -14,14 +14,6 @@ echo "--- Starting Biergarten Pipeline Environment Check ---"
mkdir -p "$OUTPUT_DIR"
mkdir -p "$(dirname "$LOG_PATH")"
# 2. Check for model file
if [ ! -f "$MODEL_PATH" ]; then
echo "ERROR: Model not found at $MODEL_PATH"
echo "Current /workspace/models contents:"
ls -lh /workspace/models 2>/dev/null || echo "(directory does not exist)"
exit 1
fi
# 3. Build the command arguments
ARGS=(
"--model" "$MODEL_PATH"
@@ -44,6 +36,24 @@ if [[ -n "$BIERGARTEN_EXTRA_ARGS" ]]; then
fi
echo "--- Executing: $EXECUTABLE ${ARGS[*]} ---"
# 2. Ensure model directory exists
mkdir -p "$(dirname "$MODEL_PATH")"
# 3. Download model if missing
if [ ! -f "$MODEL_PATH" ]; then
echo "Model not found. Downloading..."
curl -L \
-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
# 4. Verify model exists
if [ ! -f "$MODEL_PATH" ]; then
echo "ERROR: Model still not found after download attempt."
exit 1
fi
# Execute the binary directly, replacing the shell process
exec "$EXECUTABLE" "${ARGS[@]}"