File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed
Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 11.ONESHELL :
2+ .SHELLFLAGS := -c
3+
24.PHONY : run
35.PHONY : uninstall
46.PHONY : install
7+ .PHONY : install-pre-commit
8+ .PHONY : docker_build
9+ .PHONY : docker_run
10+
11+
12+ detect_conda_bin := $(shell bash -c 'if [ "${CONDA_EXE} " == " " ]; then \
13+ CONDA_EXE=$$((find /opt/conda/bin/conda || find ~/anaconda3/bin/conda || \
14+ find /usr/local/anaconda3/bin/conda || find ~/miniconda3/bin/conda || \
15+ find /root/miniconda/bin/conda || find ~/Anaconda3/Scripts/conda || \
16+ find $$CONDA/bin/conda ) 2>/dev/null) ; fi; \
17+ if [ "${CONDA_EXE}_" == "_" ]; then \
18+ echo "Please install Anaconda w/ Python 3.10+ first"; \
19+ echo "See: https://www.anaconda.com/distribution/"; \
20+ exit 1; fi; \
21+ echo $$(dirname $${CONDA_EXE} ) ')
22+
23+ CONDA_BIN := $(detect_conda_bin )
524
625run :
726 uvicorn main:app --reload
@@ -10,10 +29,21 @@ uninstall:
1029 conda env remove -n backend-api
1130
1231install :
13- conda env create -f environment.yml
32+ if conda env list | grep -q ' ^backend-api ' ; then \
33+ echo " Environment already exists." ; \
34+ else \
35+ conda env create -f environment.yml; \
36+ fi
37+ $(MAKE ) install-pre-commit
38+
39+ install-pre-commit :
40+ /bin/bash -c ' source "${CONDA_BIN}/activate" backend-api && \
41+ if ! conda list pre-commit | grep pre-commit & > /dev/null; then \
42+ pip install pre-commit; \
43+ fi && pre-commit install'
1444
1545docker_build :
1646 docker build -t hummingbot/backend-api:latest .
1747
1848docker_run :
19- docker compose up -d
49+ docker compose up -d
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ dependencies:
1414 - git+https://github.com/felixfontein/docker-py
1515 - python-dotenv
1616 - boto3
17- - python-multipart
17+ - python-multipart==0.0.12
1818 - PyYAML
1919 - git+https://github.com/hummingbot/hbot-remote-client-py.git
2020 - flake8
You can’t perform that action at this time.
0 commit comments