-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprereq.sh
69 lines (42 loc) · 1.57 KB
/
prereq.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
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
apt-get update && apt-get install -y libgl1-mesa-glx
sudo apt-get install python3.6
apt-get install -y libglib2.0-0
# /opt/render/project/src/.venv/bin/python -m pip install --upgrade pip
python -m pip install --upgrade pip
pip install -r requirements.txt
fallocate -l 512M /swapfile
chmod 600 /swapfile
dd if=/dev/zero of=/swapfile bs=1024 count=524288
chown root:root /swapfile
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
pip --no-cache-dir install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip --no-cache-dir install ultralytics
export CUDA_VISIBLE_DEVICES=''
export TF_ENABLE_TENSORRT=0
export TF_DISABLE_DEPRECATION_WARNINGS=1
export TF_ENABLE_ONEDNN_OPTS=0
pip install tensorflow-cpu
pip uninstall -y opencv-contrib-python
# pip uninstall -y opencv-python
pip install --force-reinstall opencv-python-headless==4.5.4.58
find ~ -name "matplotlib"
rm -rf ~/.matplotlib
rm -rf ~/.cache/matplotlib
rm -rf ~/.cache/fontconfig/
pip3 install -r requirements.txt
dd if=/dev/zero of=/swapfile bs=1024 count=524288
chown root:root /swapfile
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
pip3 --no-cache-dir install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip3 --no-cache-dir install ultralytics
pip3 install tensorflow-cpu
pip3 install asyncio
pip3 uninstall opencv-contrib-python
pip3 uninstall opencv-python
# mkdir "model\bowlingTypeClassificationModels\content"
pip3 install --force-reinstall opencv-python-headless==4.5.4.58
# gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app