Zhang Li 1 éve
szülő
commit
abe9d1eb7a
2 módosított fájl, 31 hozzáadás és 1 törlés
  1. 21 1
      Dockerfile.dev
  2. 10 0
      Makefile

+ 21 - 1
Dockerfile.dev

@@ -84,7 +84,7 @@ RUN /opt/conda/bin/jupyter lab --generate-config && \
 
 FROM builder2 as builder3
 
-RUN apt-get update &&  apt-get install -y --no-install-recommends openjdk-8-jdk  krb5-user net-tools iputils-ping
+RUN apt-get update &&  apt-get install -y --no-install-recommends openjdk-8-jdk  krb5-user net-tools iputils-ping telnet
 RUN mamba install nodejs  sparkmagic  pyhive thrift sasl thrift_sasl scikit-learn -y
 # RUN /opt/conda/bin/pip install sparkmagipc -i https://pypi.douban.com/simple
 ENV PATH /opt/conda/bin/:$PATH
@@ -186,4 +186,24 @@ startretries=0\n\
 redirect_stderr=true\n\
 stdout_logfile=/var/log/jupyter.log\n\
 stdout_logfile_maxbytes=50MB\n\
+" > /etc/supervisor/conf.d/jupyter.conf
+
+# 普通版
+FROM builder2 as jupyter0
+
+RUN apt-get update &&  apt-get install -y --no-install-recommends openjdk-8-jdk  krb5-user net-tools iputils-ping telnet
+RUN mamba install nodejs  sparkmagic  pyhive thrift sasl thrift_sasl scikit-learn -y
+ENV PATH /opt/conda/bin/:$PATH
+RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
+COPY --from=builder-fe /src/dist  dist
+RUN /opt/conda/bin/pip install dist/*.whl  -i https://mirror.baidu.com/pypi/simple
+RUN echo "\
+[program:jupyter]\n\
+directory=/workspace\n\
+command=/bin/bash -c '/opt/conda/bin/jupyter lab --ip 0.0.0.0 --port 8888 --allow-root --no-browser --NotebookApp.allow_origin=* --NotebookApp.allow_remote_access=1' \n\
+autorestart=true\n\
+startretries=0\n\
+redirect_stderr=true\n\
+stdout_logfile=/var/log/jupyter.log\n\
+stdout_logfile_maxbytes=50MB\n\
 " > /etc/supervisor/conf.d/jupyter.conf

+ 10 - 0
Makefile

@@ -16,21 +16,27 @@ sxkj:
 	@sed 's#http.*\.com#http://aihub-dag\.sxkj\.com#' -i packages/jldbq-extenison/src/api/config.ts
 	@sed 's#http.*\.com#http://aihub-dag\.sxkj\.com#' -i packages/filebrowser/src/api/config.ts
 	@docker build -f Dockerfile.dev  --target image-sxkj -t SXKJ:32775/jupyterlab:sxkj .
+	@docker build -f Dockerfile.dev  --target jupyter0 -t SXKJ:32775/jupyterlab0:sxkj .
 	@docker push SXKJ:32775/jupyterlab:sxkj
+	@docker push SXKJ:32775/jupyterlab0:sxkj
 
 idctest:
 	@sed 's#http.*\.com#http://aihub-dag-idctest\.digitalyili\.com#' -i  packages/yili-dag/src/request.ts
 	@sed 's#http.*\.com#http://aihub-dag-idctest\.digitalyili\.com#' -i  packages/jldbq-extenison/src/api/config.ts
 	@sed 's#http.*\.com#http://aihub-dag-idctest\.digitalyili\.com#' -i  packages/filebrowser/src/api/config.ts
 	@docker build -f Dockerfile.dev  --target image-idctest -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:idctest .
+	@docker build -f Dockerfile.dev  --target jupyter0 -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:idctest .
 	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:idctest
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:idctest
 
 idcprod:
 	@sed 's#http.*\.com#http://aihub-dag-idc\.digitalyili\.com#' -i  packages/yili-dag/src/request.ts
 	@sed 's#http.*\.com#http://aihub-dag-idc\.digitalyili\.com#' -i  packages/jldbq-extenison/src/api/config.ts
 	@sed 's#http.*\.com#http://aihub-dag-idc\.digitalyili\.com#' -i  packages/filebrowser/src/api/config.ts
 	@docker build -f Dockerfile.dev  --target image-idcprod -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:idcprod .
+	@docker build -f Dockerfile.dev  --target jupyter0 -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:idcprod .
 	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:idcprod
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:idcprod
 
 
 txtest:
@@ -38,14 +44,18 @@ txtest:
 	@sed 's#http.*\.com#http://aihub-dag-test\.digitalyili\.com#' -i  packages/jldbq-extenison/src/api/config.ts
 	@sed 's#http.*\.com#http://aihub-dag-test\.digitalyili\.com#' -i  packages/filebrowser/src/api/config.ts
 	@docker build -f Dockerfile.dev  --target image-txtest -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:txtest .
+	@docker build -f Dockerfile.dev  --target jupyter0 -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:txtest .
 	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:txtest
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:txtest
 
 txprod:
 	@sed 's#http.*\.com#http://aihub-dag\.digitalyili\.com#' -i  packages/yili-dag/src/request.ts
 	@sed 's#http.*\.com#http://aihub-dag\.digitalyili\.com#' -i  packages/jldbq-extenison/src/api/config.ts
 	@sed 's#http.*\.com#http://aihub-dag\.digitalyili\.com#' -i  packages/filebrowser/src/api/config.ts
 	@docker build -f Dockerfile.dev  --target image-txprod -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:txprod .
+	@docker build -f Dockerfile.dev  --target jupyter0 -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:txprod .
 	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:txprod
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab0:txprod
 
 
 rsync: