Skip to content

Commit 69f21ba

Browse files
author
Andre Lanrezac
committed
feat(example): Add transfer data feature in OmpA/martini3 example Makefile
1 parent dcc73a8 commit 69f21ba

File tree

1 file changed

+24
-0
lines changed
  • example/IMPALA/Brasseur/OmpA/martini3

1 file changed

+24
-0
lines changed

example/IMPALA/Brasseur/OmpA/martini3/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
RED = \033[0;31m
2+
GREEN = \033[0;32m
3+
YELLOW = \033[0;33m
4+
BLUE = \033[0;34m
5+
RESET = \033[0m
6+
# ---------------------------------------------------------------------
7+
18
IMAGE = ghcr.io/lbt-cnrs/biospring
29
PDB2SPN = pdb2spn
310
BIOSPRING = biospring
@@ -92,3 +99,20 @@ run :
9299
-c $(MSP) \
93100
--wait --port 3000 \
94101
--sasa-classifier biospring
102+
103+
expose_data:
104+
@echo "Host machine: $(GREEN)$(shell hostname)$(RESET)"
105+
@echo "On the client side, you can retrive the data with the following command:"
106+
@echo "\n $(GREEN)get_data HOSTNAME=$(shell hostname)$(RESET)\n"
107+
@docker run --network host --rm --init -v $(PWD):/data $(IMAGE) python -m http.server 4000 --directory /data
108+
109+
get_data :
110+
@if [ -z "$(HOSTNAME)" ]; then \
111+
echo "$(RED)Usage: make get_data HOSTNAME=<hostname>$(RESET)"; \
112+
exit 1; \
113+
fi
114+
115+
@echo "$(GREEN)Retrieving data from http://$(HOSTNAME):4000/model.* ...$(RESET)"
116+
@wget -q -r -np -nH --accept-regex='model.*' http://$(HOSTNAME):4000/
117+
@rm index.html
118+

0 commit comments

Comments
 (0)