-
Notifications
You must be signed in to change notification settings - Fork 0
/
ec2_deploy.sh
39 lines (27 loc) · 967 Bytes
/
ec2_deploy.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
#!/bin/bash
# Update the system
sudo yum update -y
# Install Docker
sudo yum -y install docker
# Start Docker service
sudo service docker start
# Enable Docker service to start on boot
sudo systemctl enable docker
# Add ec2-user to the docker group
sudo usermod -a -G docker ec2-user
# Give ec2-user permission to access Docker socket
sudo chmod 666 /var/run/docker.sock
# Install Git
sudo yum install git -y
# Check Git version
git --version
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Pull repository from GitHub
git clone https://github.com/DrCBeatz/doggo-gpt-mini.git
cd doggo-gpt-mini
# Pull the latest Docker image and start the app
docker-compose up -d --build
# Pull the Llama 3.1 8b model for the application using Ollama
docker-compose exec ollama ollama pull llama3.1:8b