Skip to content

Commit

Permalink
Renamed project
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicklesworthstone committed Sep 26, 2023
1 parent a4e5aad commit 7bee98b
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 158 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ COPY . .
EXPOSE 8089

# Command to run the application
CMD ["python3", "llama_2_embeddings_fastapi_server.py"]
CMD ["python3", "swiss_army_llama.py"]
185 changes: 121 additions & 64 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: llama_embeddings_fastapi_service_environment
name: swiss_army_llama_service_environment
channels:
- conda-forge
- defaults
Expand Down
4 changes: 2 additions & 2 deletions log_viewer_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime, timedelta
from pytz import timezone

log_file_path = 'llama2_embeddings_fastapi_service.log'
log_file_path = 'swiss_army_llama.log'

def safe_highlight_func(text, pattern, replacement):
try:
Expand Down Expand Up @@ -152,7 +152,7 @@ def show_logs_func(minutes: int = 5):
var text = document.querySelector('#log-container').innerText;
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', 'llama2_embeddings_fastapi_service_monitor_log__' + new Date().toISOString() + '.txt');
element.setAttribute('download', 'swiss_army_llama_monitor_log__' + new Date().toISOString() + '.txt');
element.style.display = 'none';
document.body.appendChild(element);
element.click();
Expand Down
3 changes: 1 addition & 2 deletions sentiment_score_generation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from llama_2_embeddings_fastapi_server import load_token_level_embedding_model
from llama_2_embeddings_fastapi_server import configured_logger as logger
from swiss_army_llama import configured_logger as logger
import asyncio
import psutil
import glob
Expand Down
16 changes: 8 additions & 8 deletions setup_dockerized_app_on_fresh_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ echo "Adding current user to the Docker group..."
sudo usermod -aG docker $USER

# Remove the old directory if it exists
echo "Removing old llama_embeddings_fastapi_service directory..."
rm -rf llama_embeddings_fastapi_service
echo "Removing old swiss_army_llama directory..."
rm -rf swiss_army_llama

# Clone the repository
echo "Cloning the llama_embeddings_fastapi_service repository..."
git clone https://github.com/Dicklesworthstone/llama_embeddings_fastapi_service
echo "Cloning the swiss_army_llama repository..."
git clone https://github.com/Dicklesworthstone/swiss_army_llama

# Change to the repository directory
cd llama_embeddings_fastapi_service
cd swiss_army_llama

# Build the Docker image
echo "Building the Docker image..."
Expand All @@ -38,10 +38,10 @@ base_image="ubuntu:latest"

if [ "$arch" = "x86_64" ]; then
echo "Building for x86_64..."
sudo docker build --build-arg BASE_IMAGE=$base_image --build-arg ARCH="amd64" -t llama-embeddings .
sudo docker build --build-arg BASE_IMAGE=$base_image --build-arg ARCH="amd64" -t swiss-army-llama .
elif [ "$arch" = "aarch64" ]; then
echo "Building for aarch64..."
sudo docker build --build-arg BASE_IMAGE=$base_image --build-arg ARCH="arm64" -t llama-embeddings .
sudo docker build --build-arg BASE_IMAGE=$base_image --build-arg ARCH="arm64" -t swiss-army-llama .
else
echo "Unsupported architecture."
exit 1
Expand All @@ -50,6 +50,6 @@ fi

# Run the Docker container
echo "Running the Docker container..."
sudo docker run -e TERM=$TERM -p 8089:8089 llama-embeddings
sudo docker run -e TERM=$TERM -p 8089:8089 swiss-army-llama

echo "Script completed!"
160 changes: 80 additions & 80 deletions llama_2_embeddings_fastapi_server.py → swiss_army_llama.py

Large diffs are not rendered by default.

File renamed without changes

0 comments on commit 7bee98b

Please sign in to comment.