-
Notifications
You must be signed in to change notification settings - Fork 1
/
env.sh
32 lines (23 loc) · 824 Bytes
/
env.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
if [[ $(basename '$0') = "env.sh" ]]; then
echo "Please source this script: 'source env.sh'"
exit 1 # not sourced
fi
if [[ ! -f _conda_env/bin/pip ]]; then
conda create --prefix _conda_env python=3.10 -c conda-forge || exit 10
conda activate $(realpath _conda_env)
conda install -c conda-forge cxx-compiler==1.5.2 # gcc11
conda install -c conda-forge cudatoolkit cudatoolkit-dev
conda install -c conda-forge postgresql=15
pip -v install -r requirements.txt
cde data download
python -m spacy download en_core_web_sm
python backend/sett/__init__.py
fi
conda activate $(realpath _conda_env)
export LD_LIBRARY_PATH=$(realpath _conda_env/lib64):$LD_LIBRARY_PATH
export PYTHONPATH=.
update() {
pip -v install -r requirements.txt
python backend/sett/__init__.py
}
"$@"