summaryrefslogtreecommitdiffstats
path: root/biomedisa/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-12-13 00:05:49 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-12-13 00:05:49 +0100
commit9c3d5c48694db1018d50aa85acad434f47e5ed0b (patch)
treebee24b887c12d1abaa4d942525a6c1d304dd200d /biomedisa/Makefile
downloadbiomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.tar.gz
biomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.tar.bz2
biomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.tar.xz
biomedisa-9c3d5c48694db1018d50aa85acad434f47e5ed0b.zip
Initial import
Diffstat (limited to 'biomedisa/Makefile')
-rw-r--r--biomedisa/Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/biomedisa/Makefile b/biomedisa/Makefile
new file mode 100644
index 0000000..c14b89e
--- /dev/null
+++ b/biomedisa/Makefile
@@ -0,0 +1,48 @@
+all: build
+#install: push
+
+.PHONY: rebuild build push start stop restart bash
+
+build: Dockerfile
+ docker build --tag chsa/biomedisa:latest .
+
+rebuild: Dockerfile
+ docker build --no-cache --tag chsa/biomedisa:latest .
+
+#push: build
+# docker push chsa/biomedisa:latest
+
+start: build
+ @if [ `docker ps | grep adei-mysql | wc -l` -eq 0 ]; then \
+ if [ `docker ps -a | grep adei-mysql | wc -l` -eq 0 ]; then \
+ docker run --name adei-mysql -p 53306:3306/tcp -e MYSQL_ROOT_PASSWORD="adei" -e MYSQL_DATABASE="adei" -e MYSQL_USER="adei" -e MYSQL_PASSWORD="adei" -d mysql:5.7 ;\
+ else \
+ docker start adei-mysql ;\
+ fi ;\
+ fi ;\
+ if [ `docker ps | grep chsa/adei | wc -l` -eq 0 ]; then \
+ if [ `docker ps -a | grep adei-full | wc -l` -gt 0 ]; then \
+ echo "Removing the stalled copy..." ;\
+ docker rm adei-full ;\
+ fi ;\
+ docker run -p 8000:80 --name adei-full --link adei-mysql:adei-mysql -e ADEI_PORTS=8000 -t -d chsa/adei:latest ;\
+ else \
+ echo "Already running..." ;\
+ fi
+
+stop:
+ @if [ `docker ps | grep adei-full | wc -l` -gt 0 ]; then \
+ docker stop adei-full ;\
+ docker rm adei-full ;\
+ fi
+
+stop_mysql: stop
+ docker stop adei-mysql
+
+restart:
+ make stop
+ make start
+
+bash: build
+ docker run --runtime=nvidia -it chsa/biomedisa /bin/bash
+# docker exec -it chsa/biomedisa /bin/bash