forked from hummingbot/hummingbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·51 lines (41 loc) · 1.39 KB
/
install
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
cd $(dirname $0)
# Compatibility logic for older Anaconda versions.
if [ "${CONDA_EXE} " == " " ]; then
CONDA_EXE=$((find /opt/conda/bin/conda || find ~/anaconda3/bin/conda || \
find /usr/local/anaconda3/bin/conda || find ~/miniconda3/bin/conda || \
find /root/miniconda/bin/conda || find ~/Anaconda3/Scripts/conda || \
find $CONDA/bin/conda) 2>/dev/null)
fi
if [ "${CONDA_EXE}_" == "_" ]; then
echo "Please install Anaconda w/ Python 3.7+ first"
echo "See: https://www.anaconda.com/distribution/"
exit 1
fi
CONDA_BIN=$(dirname ${CONDA_EXE})
MACOS_ENV=setup/environment.yml
LINUX_ENV=setup/environment-linux.yml
LINUX_AARCH64_ENV=setup/environment-linux-aarch64.yml
WIN64_ENV=setup/environment-win64.yml
ENV_FILE=$MACOS_ENV
if uname | egrep -qe "Linux"; then
if uname -m | egrep -qe "aarch64"; then
ENV_FILE=$LINUX_AARCH64_ENV
else
ENV_FILE=$LINUX_ENV
fi
elif uname | egrep -qe "MINGW64"; then
ENV_FILE=$WIN64_ENV
fi
if ${CONDA_EXE} env list | egrep -qe "^hummingbot"; then
${CONDA_EXE} env update -f $ENV_FILE
else
${CONDA_EXE} env create -f $ENV_FILE
fi
source "${CONDA_BIN}/activate" hummingbot
# Add the project directory to module search paths.
conda develop .
# For some reason, this needs to be installed outside of the environment file,
# or it'll give you the graphviz install error.
pip install objgraph
pre-commit install