forked from hummingbot/hummingbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·49 lines (37 loc) · 1.52 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
#!/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})
ENV_FILE=setup/environment.yml
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
# The following logic is required to replace the grpcio package installed from conda binaries in Mac Intel
# for binaries from Pypi. We need to do this because the conda binaries fro Mac Intel are broken.
# We can't use the Pypi binaries universally because they are broken for Mac ARM (M1 and M2).
# This logic can be removed once the grpcio conda binaries for Mac Intel are fixed
OS=`uname`
ARCH=`uname -m`
if [[ "$OS" = "Darwin" && "$ARCH" = "x86_64" ]]; then
pip install grpcio --ignore-installed
fi