mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
67 lines
2.0 KiB
Markdown
67 lines
2.0 KiB
Markdown
# RunPod Pod Template for Biergarten Pipeline
|
|
|
|
This folder contains a starter RunPod pod template for the C++ pipeline in the
|
|
repository root.
|
|
|
|
## What it does
|
|
|
|
- Builds `biergarten-pipeline` inside the container.
|
|
- Builds the binary on first pod start, then reuses a mode-specific build
|
|
directory (`build-mocked/` or `build-live/`).
|
|
- Runs from the repository root and lets the launcher switch into the active
|
|
build directory after CMake has copied `locations.json` and `prompts/`.
|
|
- Supports two runtime modes:
|
|
- `BIERGARTEN_MODE=mocked` — fast deterministic generation, no model required.
|
|
- `BIERGARTEN_MODE=live` — uses a mounted GGUF model and the prompt files.
|
|
- Writes generated SQLite exports and logs to writable volumes.
|
|
|
|
## Files
|
|
|
|
- `Dockerfile` — GPU-ready build image for the application.
|
|
- `start.sh` — runtime launcher that selects mocked or live mode.
|
|
- `pod-template.yaml` — starter pod template you can adapt to the exact RunPod
|
|
import/export schema.
|
|
|
|
## Build the image
|
|
|
|
```bash
|
|
docker build -t biergarten-pipeline:latest -f runpod/Dockerfile .
|
|
```
|
|
|
|
## Run locally in mocked mode
|
|
|
|
```bash
|
|
docker run --rm \
|
|
--gpus all \
|
|
-e BIERGARTEN_MODE=mocked \
|
|
-v "$PWD/output:/workspace/output" \
|
|
-v "$PWD/logs:/workspace/logs" \
|
|
biergarten-pipeline:latest
|
|
```
|
|
|
|
## Run locally in live mode
|
|
|
|
Mount your GGUF model at `/workspace/models/google_gemma-4-E4B-it-Q6_K.gguf`
|
|
and switch to `BIERGARTEN_MODE=live`.
|
|
|
|
```bash
|
|
docker run --rm \
|
|
--gpus all \
|
|
-e BIERGARTEN_MODE=live \
|
|
-v "$PWD/models:/workspace/models" \
|
|
-v "$PWD/output:/workspace/output" \
|
|
-v "$PWD/logs:/workspace/logs" \
|
|
biergarten-pipeline:latest
|
|
```
|
|
|
|
## Notes for RunPod
|
|
|
|
- Use a GPU pod for live inference.
|
|
- Mount persistent storage for `/workspace/models`, `/workspace/output`, and
|
|
`/workspace/logs`.
|
|
- If you only want deterministic seed generation, change the template's
|
|
`BIERGARTEN_MODE` to `mocked`.
|
|
- The launcher handles the build directory automatically; CMake still copies
|
|
`locations.json` and `prompts/` into the active build tree before execution.
|
|
|