-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 1.37 KB
/
Makefile
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
.PHONY: streamlit_demo streamlit_run strun clean clean-recipes
ALT_STREAMLIT_PORT := 12321
## Streamlit App
streamlit_demo:
# Note: To run the following command the port 8051 needs to be available.
# If somehow, a previously running streamlit session did not exit
# properly, you need to manually and forcibly stop it.
# Stop an already running streamlit server:
#
# sudo fuser -k 8051/tcp
streamlit run $(STREAMLIT_DEMO_APP) --server.port=8051 &
streamlit_run:
# Note: To run the following command the port 8051 needs to be available.
# If somehow, a previously running streamlit session did not exit
# properly, you need to manually and forcibly stop it.
# Stop an already running streamlit server:
#
# sudo fuser -k $(STREAMLIT_PORT)/tcp
streamlit run $(STREAMLIT_DEMO_APP) --server.port=$(ALT_STREAMLIT_PORT) &
strun:
# Example Usage:
# $ make strun APP_NAME=streamlit_repl
$(eval STREAMLIT_PORT := $(shell if [ -z $(STREAMLIT_PORT) ]; then echo 8051; else echo $(STREAMLIT_PORT); fi))
@echo STREAMLIT_PORT is: [$(STREAMLIT_PORT)]
streamlit run ./apps/$(APP_NAME)/app.py --server.port=$(STREAMLIT_PORT)
clean:
rm -rf .ipynb_checkpoints **/.ipynb_checkpoints
rm -rf .pytest_cache **/.pytest_cache
rm -rf .__pycache__ **/__pycache__ **/**/__pycache__ **/**/**/__pycache__
clean-recipes: clean
rm -rf .scrap **/.scrap **/**/.scrap