-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
45 lines (37 loc) · 1.33 KB
/
setup.sh
File metadata and controls
45 lines (37 loc) · 1.33 KB
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
#/bin/bash
# setup the entire system for the visual translation
## translation environment
root_dir=$(pwd)
conda create -n itv2_hf python=3.9 -y
conda activate itv2_hf
conda install pip -y
python -m pip install --upgrade pip
python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu118
python -m pip install nltk sacremoses pandas regex mock transformers>=4.33.2 mosestokenizer
python -c "import nltk; nltk.download('punkt')"
python -m pip install bitsandbytes scipy accelerate datasets flash-attn>=2.1
python -m pip install sentencepiece
git clone https://github.com/VarunGumma/IndicTransToolkit
cd IndicTransToolkit
python -m pip install --editable ./
pip install scipy
cd $root_dir
conda deactivate
## scene text erasor environment
git clone https://github.com/Onkarsus13/Diff_SceneTextEraser.git
conda create -n scene_text_eraser python=3.9 -y
conda activate scene_text_eraser
cd Diff_SceneTextEraser
pip install -e ".[torch]"
pip install -e .[all,dev,notebooks]
pip install "jax==0.4.23" "jaxlib==0.4.23" "huggingface_hub<0.26.0"
cd $root_dir
conda deactivate
## srnet_plus_2 environment
conda create -n srnet_plus_2 python=3.8.0 -y
conda activate srnet_plus_2
pip install -r srnet_plus2.txt
conda deactivate
## imagemagick, pango,cairo,pangocairo
sudo apt update
sudo apt install libpango1.0-dev libcairo2-dev imagemagick