Spaces:
Sleeping
Sleeping
Remove HF_TOKEN from script
Browse files
deploy.sh
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
sudo apt update
|
| 4 |
+
# sudo apt install -y libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 ffmpeg
|
| 5 |
+
sudo apt install -y libgl1-mesa-glx
|
| 6 |
+
|
| 7 |
+
if [ -d "Translator_API" ]; then
|
| 8 |
+
cd Translator_API && git pull origin main
|
| 9 |
+
else
|
| 10 |
+
git clone https://github.com/keerthi042000/Translator_API.git
|
| 11 |
+
fi
|
| 12 |
+
|
| 13 |
+
cd ~/projects
|
| 14 |
+
python3 -m venv venv
|
| 15 |
+
source venv/bin/activate
|
| 16 |
+
|
| 17 |
+
pip install --upgrade pip
|
| 18 |
+
pip install -r ~/projects/Translator_API/requirements.txt
|
| 19 |
+
|
| 20 |
+
nohup python3 ~/projects/Translator_API/app.py > ~/projects/project2.log 2>&1 &
|