-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme
84 lines (70 loc) · 1.61 KB
/
Readme
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
-- EC2 Connect
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
y
sudo usermod -a -G docker ec2-user
pwd
mkdir downloads
cd downloads
-- Gib Bash --
ls
chmod 600 key-pair-fastapi2.pem
-- EC2 Connect
pwd
-- Gib Bash --
scp -i key-pair-fastapi2.pem Dockerfile fastapi_app.py requirements.txt ec2-user@<'public ip'>:/home/ec2-user/downloads
yes
-- EC2 Connect
ls
-- EC2 Connect
-- out of space
docker system prune
docker system df
docker whisper-api-img prune --all
sudo apt-get clean
-- EC2 Connect
-- mount the volume
lsblk
sudo mkfs -t ext4 /dev/sdd
sudo mkdir /mnt/data
sudo mount /dev/sdd /mnt/data
df -h
-- automatic mount at boot
echo '/dev/xvdd /mnt/data ext4 defaults,nofail 0 2' | sudo tee -a /etc/fstab
-- EC2 Connect
sudo docker build -t whisper-api-img:v1.0 -f Dockerfile .
sudo docker images
sudo docker run -d -p 80:8000 whipser-pi-img:v1.0
-- Browse --
<'public ip'>
-- EC2 Connect
sudo docker ps
sudo docker stop <'container id'>
-- AWS Console
stop or terminate instance
-- SSH
cd "/d/Nueva carpeta/WhisperAPI"
ls
chmod 400 "key-pair-fastapi2.pem"
ssh -i "key-pair-fastapi2.pem" [email protected]
sudo apt-get update
sudo apt install -y python3-pip nginx
sudo vim /etc/nginx/sites-enabled/fastapi_nginx
server {
listen 80;
server_name 18.234.239.101;
location / {
proxy_pass http://127.0.0.1:8000;
}
}
esc
:qt
cat /etc/nginx/sites-enabled/fastapi_nginx
sudo service nginx restart
git clone https://github.com/nicoprofe/whisper-fastapi.git
ls
cd whisper-fastapi
ls
cat requirements.txt
pip3 install -r requirements.txt