Add Ipython (#1685)

This commit is contained in:
ahkui 2018-07-13 11:33:41 +08:00 committed by Shao Yu-Lung (Allen)
parent 85c57a0b6f
commit 29483bab8c
6 changed files with 97 additions and 0 deletions

View File

@ -717,9 +717,31 @@ services:
volumes:
- ${DATA_PATH_HOST}/portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
ports:
- 9010:9000
### IPython #########################################
ipython-controller:
build:
context: ./ipython
dockerfile: Dockerfile.controller
networks:
- backend
extra_hosts:
- "laradock-ipython:${LARADOCK_IPYTHON_CONTROLLER_IP}"
ports:
- "33327-33338:33327-33338"
ipython-engine:
build:
context: ./ipython
dockerfile: Dockerfile.engine
networks:
- backend
extra_hosts:
- "laradock-ipython:${LARADOCK_IPYTHON_CONTROLLER_IP}"
### Docker-in-Docker ################################################
docker-in-docker:
image: docker:dind

View File

@ -360,6 +360,9 @@ SOLR_VERSION=5.5
SOLR_PORT=8983
SOLR_DATAIMPORTHANDLER_MYSQL=false
### IPYTHON ##################################################
LARADOCK_IPYTHON_CONTROLLER_IP=127.0.0.1
### NETDATA ###############################################
NETDATA_PORT=19999

View File

@ -0,0 +1,17 @@
FROM python:3.5-alpine
LABEL maintainer="ahkui <ahkui@outlook.com>"
USER root
RUN apk add --no-cache build-base
RUN python -m pip --quiet --no-cache-dir install \
ipyparallel
RUN ipython profile create --parallel --profile=default
COPY ipcontroller-client.json /root/.ipython/profile_default/security/ipcontroller-client.json
COPY ipcontroller-engine.json /root/.ipython/profile_default/security/ipcontroller-engine.json
CMD ["sh","-c","ipcontroller --ip=* --reuse"]

23
ipython/Dockerfile.engine Normal file
View File

@ -0,0 +1,23 @@
FROM python:3.5-alpine
LABEL maintainer="ahkui <ahkui@outlook.com>"
USER root
RUN apk add --no-cache build-base
RUN python -m pip --quiet --no-cache-dir install \
ipyparallel \
numpy \
pandas \
pymongo \
redis \
requests \
bs4
RUN ipython profile create --parallel --profile=default
COPY ipcontroller-client.json /root/.ipython/profile_default/security/ipcontroller-client.json
COPY ipcontroller-engine.json /root/.ipython/profile_default/security/ipcontroller-engine.json
CMD ["sh","-c","ipcluster engines"]

View File

@ -0,0 +1,16 @@
{
"key": "868074dd-060311910ab3d6991611bccf",
"signature_scheme": "hmac-sha256",
"unpack": "json",
"pack": "json",
"ssh": "",
"task_scheme": "leastload",
"interface": "tcp://*",
"location": "laradock-ipython",
"notification": 33338,
"iopub": 33337,
"control": 33336,
"mux": 33335,
"task": 33334,
"registration": 33333
}

View File

@ -0,0 +1,16 @@
{
"key": "868074dd-060311910ab3d6991611bccf",
"signature_scheme": "hmac-sha256",
"unpack": "json",
"pack": "json",
"ssh": "",
"interface": "tcp://*",
"location": "laradock-ipython",
"iopub": 33327,
"hb_ping": 33328,
"hb_pong": 33329,
"control": 33330,
"mux": 33331,
"task": 33332,
"registration": 33333
}