rabin 7 سال پیش
والد
کامیت
da28603e8b

+ 1 - 1
src/docker/build/learning/Dockerfile

@@ -2,7 +2,7 @@ FROM docker.dever.cc/dev/python/v3:latest
 
 MAINTAINER Rabin "https://github.com/shemic"
 
-RUN apk update && apk add --no-cache python3-dev gcc g++ automake lapack lapack-dev gfortran freetype freetype-dev && \
+RUN apk update && apk add --no-cache python3-dev gcc g++ automake lapack lapack-dev gfortran freetype freetype-dev libstdc++ tk-dev python3-tkinter && \
 	pip3 install numpy && \
 	pip3 install scipy && \
 	pip3 install pandas && \

+ 22 - 0
src/docker/build/learning/jupyter/Dockerfile

@@ -0,0 +1,22 @@
+FROM docker.dever.cc/learning:latest
+
+MAINTAINER Rabin "https://github.com/shemic"
+
+RUN apk update && apk add --no-cache gcc g++ curl make libzmq python-dev python3 python3-dev && \
+	curl -O http://www.dever.cc/file/zeromq/zeromq-4.2.1.tar.gz && \
+	tar -zxvf zeromq-4.2.1.tar.gz && \
+	cd zeromq-4.2.1 && \
+	./configure --prefix=/usr/local/zeromq && \
+	make && make install && \
+	cd .. && \
+	rm -rf zeromq* && \
+	pip2 install pyzmq --install-option="--zmq=/usr/local/zeromq" && \
+	#pip2 install ipython && \
+	pip2 install jupyter && \
+	pip3 install pyzmq --install-option="--zmq=/usr/local/zeromq" && \
+	pip3 install -U ipykernel && \
+	python3 -m ipykernel install --user && \
+	mkdir /usr/local/jupyter && \
+	apk del curl gcc g++ make python-dev python3-dev
+
+COPY jupyter.sh /entrypoint/jupyter.sh

+ 17 - 0
src/docker/build/learning/jupyter/jupyter.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+start_jupyter()
+{
+	jupyter notebook --allow-root --no-browser --notebook-dir=/usr/local/jupyter --port=8888 --ip=*
+}
+
+stop_jupyter()
+{
+	true
+}
+
+monit_jupyter()
+{
+	process_monit jupyter
+}