|
@@ -44,7 +44,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
ttf-wqy-zenhei \
|
|
|
libgl1-mesa-glx \
|
|
|
libglib2.0-0 \
|
|
|
- locales &&\
|
|
|
+ locales \
|
|
|
+ krb5-user net-tools telnet && \
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
@@ -59,7 +60,7 @@ FROM builder as builder1
|
|
|
|
|
|
ENV PYTHON_VERSION 3
|
|
|
RUN chsh -s `which zsh`
|
|
|
-RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda${PYTHON_VERSION}-latest-Linux-x86_64.sh && \
|
|
|
+RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-py37_4.12.0-Linux-x86_64.sh && \
|
|
|
chmod +x ~/miniconda.sh && \
|
|
|
~/miniconda.sh -b -p /opt/conda && \
|
|
|
rm ~/miniconda.sh
|
|
@@ -74,22 +75,19 @@ RUN ln /opt/conda/bin/mamba /usr/local/bin/mamba && mamba init zsh
|
|
|
FROM builder1 as builder2
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
-
|
|
|
RUN /opt/conda/bin/pip install jupyterlab jupyterlab-language-pack-zh-CN -i https://pypi.douban.com/simple
|
|
|
-RUN mamba install nodejs -y
|
|
|
+RUN mamba install nodejs sparkmagic -y
|
|
|
+# pyhive thrift sasl thrift_sasl scikit-learn
|
|
|
# password 'sx'
|
|
|
RUN /opt/conda/bin/jupyter lab --generate-config && \
|
|
|
echo "c.NotebookApp.password='argon2:\$argon2id\$v=19\$m=10240,t=10,p=8\$+zIUCF9Uk2FiCHlV8njX5A\$I5Mm/64DORArcXYTXWRVng'">>/root/.jupyter/jupyter_lab_config.py
|
|
|
+ENV PATH /opt/conda/bin/:$PATH
|
|
|
+RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
|
|
|
|
|
|
|
|
|
FROM builder2 as builder3
|
|
|
|
|
|
-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
|
|
|
-RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
|
|
|
-RUN cd /opt/conda/lib/python3.9/site-packages/ \
|
|
|
+RUN cd /opt/conda/lib/python3.7/site-packages/ \
|
|
|
&& jupyter-kernelspec install sparkmagic/kernels/sparkkernel \
|
|
|
&& jupyter-kernelspec install sparkmagic/kernels/pysparkkernel \
|
|
|
&& /opt/conda/bin/jupyter serverextension enable --py sparkmagic
|
|
@@ -191,10 +189,6 @@ stdout_logfile_maxbytes=50MB\n\
|
|
|
# 普通版
|
|
|
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 "\
|