-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
44 lines (33 loc) · 863 Bytes
/
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
40
41
42
43
44
#!/bin/bash
# Install dependencies
apt-get update && apt-get install -y ffmpeg git python3-venv
# Set environment variables
export TMPDIR=/temp_dir
export PYTHONPATH=.
export PREFIX=INFER
export HYDRA_FULL_ERROR=1
export USER=micro
# Create directory
mkdir /temp_dir
# Create Python virtual environment
#python3 -m venv myenv
# Activate the virtual environment
source myenv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Create app directory
mkdir app
cd app
# Clone fairseq and install
git clone https://github.com/pytorch/fairseq
cd fairseq
pip install --editable ./ && pip install tensorboardX
# Download the model
wget -P ./models_new 'https://dl.fbaipublicfiles.com/mms/asr/mms1b_fl102.pt'
# Navigate back to the main directory
cd ..
cd ..
# Run the API
python api.py
# Deactivate the virtual environment
deactivate