view mrjunejune/production_entrypoint.sh @ 270:358dd5950985

sync production config on every deploy Always install the ignored repository .config into /etc/mrjunejune before promoting the new bundle. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 13:16:47 -0700
parents f7b1188d5fb1
children
line wrap: on
line source

#!/usr/bin/env bash
set -euo pipefail

bundle_root="$(cd "$(dirname "$0")" && pwd)"
cd "$bundle_root"

copilot_cli="$(
  find -L "$bundle_root" -type f \
    \( \
      -path '*+_repo_rules2+copilot_cli_linux_x86_64/copilot' -o \
      -path '*+http_archive+copilot_cli_linux_x86_64/copilot' \
    \) -print -quit
)"
python_runtime="$(
  find -L "$bundle_root" -type f \
    -path '*/rules_python++python+python_3_11_x86_64-unknown-linux-gnu/bin/python3' \
    -print -quit
)"
if [[ -z "$copilot_cli" || -z "$python_runtime" ]]; then
  echo "Production bundle is missing Copilot or Python runtime" >&2
  exit 1
fi

exec "$bundle_root/mrjunejune/inference_stack.sh" \
  "$bundle_root/mrjunejune_server_binary" \
  "$bundle_root/mrjunejune/inference_sidecar_launcher.sh" \
  "$bundle_root/mrjunejune/inference/copilot_sidecar.zip" \
  "$copilot_cli" \
  "$bundle_root/mrjunejune/inference/litellm_proxy.zip" \
  "$bundle_root/mrjunejune/inference/litellm_config.yaml" \
  "$python_runtime"