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 1
1
.ONESHELL :
2
+ .SHELLFLAGS := -c
3
+
2
4
.PHONY : run
3
5
.PHONY : uninstall
4
6
.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 )
5
24
6
25
run :
7
26
uvicorn main:app --reload
@@ -10,10 +29,21 @@ uninstall:
10
29
conda env remove -n backend-api
11
30
12
31
install :
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'
14
44
15
45
docker_build :
16
46
docker build -t hummingbot/backend-api:latest .
17
47
18
48
docker_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:
14
14
- git+https://github.com/felixfontein/docker-py
15
15
- python-dotenv
16
16
- boto3
17
- - python-multipart
17
+ - python-multipart==0.0.12
18
18
- PyYAML
19
19
- git+https://github.com/hummingbot/hbot-remote-client-py.git
20
20
- flake8
You can’t perform that action at this time.
0 commit comments