-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add chat script * include script * fix formatting * rename files * fix script
- Loading branch information
1 parent
a02b523
commit bcf7da0
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
script = """ | ||
#!/bin/bash | ||
# Prompt user for necessary arguments | ||
read -p "What's your github repo name: " repo_name | ||
read -p "What's your github URL: " user_repo_url | ||
# Check if tag is empty and set default | ||
if [ -z "$tag" ]; then | ||
tag="latest" | ||
fi | ||
# Pull the Docker image | ||
echo "Pulling the Docker image..." | ||
docker pull ghcr.io/agpt-agent/backend-chat:latest | ||
# Run the Docker container with user-provided arguments | ||
echo "Running the Docker container..." | ||
docker run -p 8501:8501 \ | ||
-e REPO_URL=$user_repo_url \ | ||
-e PERSIST_DIRECTORY="db/$repo_name" \ | ||
ghcr.io/agpt-agent/backend-chat:latest | ||
echo "Chat is running on http://localhost:8501" | ||
""".lstrip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters