forked from Dicklesworthstone/swiss_army_llama
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_dockerized_app_on_fresh_machine.sh
42 lines (31 loc) · 1.08 KB
/
setup_dockerized_app_on_fresh_machine.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Update system packages
echo "Updating system packages..."
sudo apt-get update
# Install Docker
echo "Installing Docker..."
sudo apt-get install docker.io
# Start Docker service
echo "Starting Docker service..."
sudo systemctl start docker
# Display Docker version
echo "Checking Docker version..."
sudo docker --version
# Add the current user to the docker group
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
# Clone the repository
echo "Cloning the llama_embeddings_fastapi_service repository..."
git clone https://github.com/Dicklesworthstone/llama_embeddings_fastapi_service
# Change to the repository directory
cd llama_embeddings_fastapi_service
# Build the Docker image
echo "Building the Docker image..."
sudo docker build -t llama-embeddings .
# Run the Docker container
echo "Running the Docker container..."
sudo docker run -e TERM=$TERM -p 8089:8089 llama-embeddings
echo "Script completed!"