-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevelop.sh
More file actions
executable file
·51 lines (34 loc) · 1.46 KB
/
develop.sh
File metadata and controls
executable file
·51 lines (34 loc) · 1.46 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
44
45
46
47
48
49
50
51
#!/bin/bash
set -e
set -o pipefail
echo "Start installation"
if ! command -v conda &> /dev/null
then
echo "conda could not be found, please ensure you've installed conda and place it in PATH."
exit
fi
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
conda create -y -n modfire "python<3.9" "torchdata<1" pytorch-cuda=11.7 "faiss-cpu<1.8" "torchvision<1" "pytorch>=1.13,<2" -c pytorch -c nvidia
elif [[ "$OSTYPE" == "darwin"* ]]; then
conda create -y -n modfire "python<3.9" "torchdata<1" "faiss-cpu<1.8" "pytorch>=1.13,<2" "torchvision<1" -c pytorch
else
conda create -y -n modfire "python<3.9" "torchdata<1" pytorch-cuda=11.7 "faiss-cpu<1.8" "torchvision<1" "pytorch>=1.13,<2" -c pytorch -c nvidia
fi
eval "$(conda shell.bash hook)"
conda activate modfire
if [[ "$CONDA_DEFAULT_ENV" != "modfire" ]]; then
echo "Can't activate conda env modfire, exit."
exit
fi
conda install -y -n modfire "tensorboard<3" "rich<11" "python-lmdb<2" "pyyaml<7" "marshmallow<4" "click<9" "msgpack-python<2" "scipy<2" packaging -c conda-forge
ADD_ENTRY=SET pip install -e .
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sed -i "1 s|$| -O|" "$(which modfire)"*
elif [[ "$OSTYPE" == "darwin"* ]]; then
sed -i "" "1 s|$| -O|" "$(which modfire)"*
else
sed -i "1 s|$| -O|" "$(which modfire)"*
fi
echo "Installation done!"
echo "If you want to train models, please install NVIDIA/Apex manually."
echo "If you want to use streamlit service, please install streamlit via pip."