annotate service/reasoning/makefile @ 392:79d041273e26

mqtt has two devices now. various older cleanups. Ignore-this: 67ca3acc5dc6aa672d0c896c9f5ae48e
author drewp@bigasterisk.com
date Sat, 19 Jan 2019 12:08:59 -0800
parents 2efa246a65e7
children 1ceb26846eca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
351
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
1 JOB=reasoning
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
2 PORT=9071
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
3
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
4 TAG=bang6:5000/${JOB}_x86:latest
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
5
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
6 build_image:
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
7 rm -rf tmp_ctx
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
8 mkdir -p tmp_ctx
360
2efa246a65e7 move reasoning into docker
drewp@bigasterisk.com
parents: 351
diff changeset
9 cp -a Dockerfile ../../lib/*.py ../../lib/twisted_sse_demo *.py *.n3 *.html input req* tmp_ctx
351
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
10 rsync -a input tmp_ctx/
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
11 docker build --network=host -t ${TAG} tmp_ctx
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
12 docker push ${TAG}
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
13 rm -r tmp_ctx
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
14
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
15 shell:
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
16 docker run --rm -it --cap-add SYS_PTRACE --net=host ${TAG} /bin/bash
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
17
392
79d041273e26 mqtt has two devices now. various older cleanups.
drewp@bigasterisk.com
parents: 360
diff changeset
18 local_run: build_image
351
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
19 docker run --rm -it -p ${PORT}:${PORT} \
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
20 -v `pwd`:/mnt \
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
21 --net=host \
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
22 ${TAG} \
7716b1810d6c reasoning & collector move into docker images
drewp@bigasterisk.com
parents:
diff changeset
23 python /mnt/${JOB}.py -iro