scripts/generate-diversity-cache.sh

29 lines

1#!/usr/bin/env bash
2# Wrapper script for diversity cache generation
3# Ensures GPU version is used by default
4
5set -euo pipefail
6
7DIR="${1:-/mnt/mtwo/programming/ai-stuff/neocities-modernization}"
8cd "$DIR" || exit 1
9
10# Check for GPU library
11if [ ! -f "libs/vulkan-compute/build/libvkcompute.so" ]; then
12 echo "Error: GPU library not found" >&2
13 echo "Build it with: cd libs/vulkan-compute && make" >&2
14 exit 1
15fi
16
17# Check for embeddings
18if [ ! -f "assets/embeddings/embeddinggemma_latest/embeddings.json" ]; then
19 echo "Error: Embeddings not found" >&2
20 echo "Generate them with: ./run.sh --generate-embeddings" >&2
21 exit 1
22fi
23
24echo "🎲 Generating diversity cache with GPU..."
25echo ""
26
27# Run GPU script
28exec "$DIR/scripts/precompute-diversity-sequences-gpu" "$DIR"
29