comparison mrjunejune/production_entrypoint.sh @ 267:a78f5986011f

discover bundled production runtimes Locate Bazel-packaged Copilot and Python binaries by stable suffix instead of hardcoding an external repository prefix. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 12:58:55 -0700
parents 056790c4fb0d
children f7b1188d5fb1
comparison
equal deleted inserted replaced
266:efaf4c63cc94 267:a78f5986011f
2 set -euo pipefail 2 set -euo pipefail
3 3
4 bundle_root="$(cd "$(dirname "$0")" && pwd)" 4 bundle_root="$(cd "$(dirname "$0")" && pwd)"
5 cd "$bundle_root" 5 cd "$bundle_root"
6 6
7 copilot_cli="$(
8 find -L "$bundle_root" -type f \
9 -path '*/copilot_cli_linux_x86_64/copilot' -print -quit
10 )"
11 python_runtime="$(
12 find -L "$bundle_root" -type f \
13 -path '*/rules_python++python+python_3_11_x86_64-unknown-linux-gnu/bin/python3' \
14 -print -quit
15 )"
16 if [[ -z "$copilot_cli" || -z "$python_runtime" ]]; then
17 echo "Production bundle is missing Copilot or Python runtime" >&2
18 exit 1
19 fi
20
7 exec "$bundle_root/mrjunejune/inference_stack.sh" \ 21 exec "$bundle_root/mrjunejune/inference_stack.sh" \
8 "$bundle_root/mrjunejune_server_binary" \ 22 "$bundle_root/mrjunejune_server_binary" \
9 "$bundle_root/mrjunejune/inference_sidecar_launcher.sh" \ 23 "$bundle_root/mrjunejune/inference_sidecar_launcher.sh" \
10 "$bundle_root/mrjunejune/inference/copilot_sidecar.zip" \ 24 "$bundle_root/mrjunejune/inference/copilot_sidecar.zip" \
11 "$bundle_root/+http_archive+copilot_cli_linux_x86_64/copilot" \ 25 "$copilot_cli" \
12 "$bundle_root/mrjunejune/inference/litellm_proxy.zip" \ 26 "$bundle_root/mrjunejune/inference/litellm_proxy.zip" \
13 "$bundle_root/mrjunejune/inference/litellm_config.yaml" \ 27 "$bundle_root/mrjunejune/inference/litellm_config.yaml" \
14 "$bundle_root/rules_python++python+python_3_11_x86_64-unknown-linux-gnu/bin/python3" 28 "$python_runtime"