glm53 1001 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # docker compose with the model and every overlay in experimental/compose, in
  3. # the order the README's numbers were measured with (later files win).
  4. #
  5. # ./glm53 up -d start
  6. # ./glm53 down --timeout 60 stop
  7. # ./glm53 logs -f | ps | config anything else docker compose takes
  8. # ./glm53 -f compose/ext.yaml up -d your own files, after the overlays
  9. # ./glm53 --stock up -d compose/glm53.yaml alone (stock kernels;
  10. # the entrypoint also wants ALLOW_STOCK=1)
  11. set -e
  12. cd "$(dirname "$0")"
  13. overlays=(arx snapshot adaptive-k fp8 megamoe fixes sp recoverssm)
  14. files=(-f compose/glm53.yaml)
  15. extra=()
  16. stock=0
  17. while [ $# -gt 0 ]; do
  18. case $1 in
  19. --stock) stock=1; shift ;;
  20. -f) extra+=(-f "$2"); shift 2 ;;
  21. *) break ;;
  22. esac
  23. done
  24. if [ $stock = 0 ]; then
  25. for o in "${overlays[@]}"; do files+=(-f "experimental/compose/$o.yaml"); done
  26. fi
  27. exec docker compose "${files[@]}" "${extra[@]}" "$@"