From 2e41f8dcba533f2a504ac1c49658bbbab4136772 Mon Sep 17 00:00:00 2001 From: Rohit Sood Date: Sat, 30 Dec 2023 14:34:08 -0500 Subject: [PATCH] added makefile --- .gitignore | 1 + Makefile | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index f6a4cc87..b7178ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ stock*.pkl results*.pkl *.spec .DS_Store +.history/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..68313901 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +build: + docker build -t screeni-py . + +run: + docker run -d --name screeni-py -p 8501:8501 screeni-py + +interactive-run: + docker run -p 8501:8501 screeni-py + +shell: + docker run -it --entrypoint /bin/bash screeni-py + +stop-container: + @if [ "$(shell docker ps -q -f name=screeni-py)" ]; then \ + docker stop screeni-py; \ + else \ + echo "Container screeni-py is not running."; \ + fi + +remove-container: + @if [ "$(shell docker ps -a -q -f name=screeni-py)" ]; then \ + docker rm screeni-py; \ + else \ + echo "Container screeni-py does not exist."; \ + fi + +system-clean: + docker system prune --force + +rebuild: stop-container remove-container build system-clean