2024-10-06 22:14:46 +00:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2024-10-06 22:30:18 +00:00
|
|
|
|
⚡️all-the-things() {
|
|
|
|
|
_help-line "Build the image, run the service"
|
|
|
|
|
$0 build-image
|
|
|
|
|
$0 run-service
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️run-service() {
|
|
|
|
|
_help-line "Start docker container with port 5000 exposed"
|
2024-10-08 00:10:55 +00:00
|
|
|
|
docker run --rm -ti -p 5000:5000 -v $PWD/interface:/interface --name breach -e OPENAI_KEY=$(pass openai/project-key) itbaas
|
2024-10-06 22:30:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-10-06 22:14:46 +00:00
|
|
|
|
⚡️build-image() {
|
2024-10-06 22:30:18 +00:00
|
|
|
|
_help-line "Build image with game and service"
|
2024-10-06 22:14:46 +00:00
|
|
|
|
extract_assets
|
|
|
|
|
docker build -t itbaas .
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-09 19:10:30 +00:00
|
|
|
|
⚡️message() {
|
|
|
|
|
_help-line "Send message to llm in docker"
|
|
|
|
|
docker exec breach curl -sX post localhost:5000/prompt-in-context -d "$@"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️reset() {
|
|
|
|
|
_help-line "Reset the llm message history"
|
|
|
|
|
docker exec breach curl -s localhost:5000/reset
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-06 22:14:46 +00:00
|
|
|
|
extract_assets() {
|
2024-10-06 22:30:18 +00:00
|
|
|
|
7z x -aos -o.generated/game/ assets/Into_the_Breach_Linux.1.2.23.zip
|
2024-10-06 22:14:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
source <(cat /tmp/⚡ 2> /dev/null || curl https://apps.ofvlad.xyz/⚡ | tee /tmp/⚡)
|