kopia lustrzana https://github.com/jupyterhub/repo2docker
rodzic
d97eee9a6a
commit
dd82e688e7
|
@ -65,6 +65,9 @@ RUN apt-get update && \
|
|||
rm -rf /var/lib/apt/lists/*
|
||||
{% endif -%}
|
||||
|
||||
# make JUPYTERHUB_VERSION a build argument
|
||||
ARG JUPYTERHUB_VERSION=0.7.2
|
||||
|
||||
EXPOSE 8888
|
||||
|
||||
{% if env -%}
|
||||
|
@ -136,6 +139,16 @@ class BuildPack(LoggingConfigurable):
|
|||
and there are *some* general guarantees of ordering.
|
||||
|
||||
"""
|
||||
|
||||
jupyterhub_version = Unicode(
|
||||
'0.7.2',
|
||||
config=True,
|
||||
help="""JupyterHub version to install.
|
||||
|
||||
In general, the JupyterHub version in the image
|
||||
and the Hub itself should have the same version number.
|
||||
"""
|
||||
)
|
||||
packages = Set(
|
||||
set(),
|
||||
help="""
|
||||
|
@ -392,7 +405,10 @@ class BuildPack(LoggingConfigurable):
|
|||
fileobj=tarf,
|
||||
tag=image_spec,
|
||||
custom_context=True,
|
||||
decode=True
|
||||
buildargs={
|
||||
'JUPYTERHUB_VERSION': self.jupyterhub_version,
|
||||
},
|
||||
decode=True,
|
||||
):
|
||||
yield line
|
||||
|
||||
|
@ -481,7 +497,7 @@ class PythonBuildPack(BuildPack):
|
|||
r"""
|
||||
pip install --no-cache-dir \
|
||||
notebook==5.0.0 \
|
||||
jupyterhub==0.7.2 \
|
||||
jupyterhub==${JUPYTERHUB_VERSION} \
|
||||
ipywidgets==6.0.0 \
|
||||
jupyterlab==0.24.1 && \
|
||||
jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
|
||||
|
@ -704,7 +720,10 @@ class DockerBuildPack(BuildPack):
|
|||
for line in client.build(
|
||||
path=os.getcwd(),
|
||||
tag=image_spec,
|
||||
decode=True
|
||||
buildargs={
|
||||
'JUPYTERHUB_VERSION': self.jupyterhub_version,
|
||||
},
|
||||
decode=True,
|
||||
):
|
||||
yield line
|
||||
|
||||
|
@ -719,10 +738,11 @@ class LegacyBinderDockerBuildPack(DockerBuildPack):
|
|||
USER main
|
||||
WORKDIR /home/main/notebooks
|
||||
ENV PATH /home/main/anaconda2/envs/python3/bin:$PATH
|
||||
RUN conda install -n python3 notebook==5.0.0 ipykernel==4.6.0 && \
|
||||
pip install jupyterhub==0.7.2 && \
|
||||
conda remove -n python3 nb_conda_kernels && \
|
||||
conda install -n root ipykernel==4.6.0 && \
|
||||
ARG JUPYTERHUB_VERSION
|
||||
RUN conda install -yq -n python3 notebook==5.0.0 ipykernel==4.6.0 && \
|
||||
pip install --no-cache-dir jupyterhub==${JUPYTERHUB_VERSION} && \
|
||||
conda remove -yq -n python3 nb_conda_kernels && \
|
||||
conda install -yq -n root ipykernel==4.6.0 && \
|
||||
/home/main/anaconda2/envs/python3/bin/ipython kernel install --sys-prefix && \
|
||||
/home/main/anaconda2/bin/ipython kernel install --prefix=/home/main/anaconda2/envs/python3 && \
|
||||
/home/main/anaconda2/bin/ipython kernel install --sys-prefix
|
||||
|
|
|
@ -5,5 +5,3 @@ dependencies:
|
|||
- ipykernel==4.6.0
|
||||
- ipywidgets==6.0.0
|
||||
- jupyterlab==0.22.1
|
||||
- pip:
|
||||
- jupyterhub==0.7.2
|
||||
|
|
|
@ -30,6 +30,7 @@ ${CONDA_DIR}/bin/conda config --system --set update_dependencies false
|
|||
${CONDA_DIR}/bin/conda config --system --set show_channel_urls true
|
||||
|
||||
${CONDA_DIR}/bin/conda env update -n root -f /tmp/environment.yml
|
||||
${CONDA_DIR}/bin/pip install --no-cache-dir jupyterhub==${JUPYTERHUB_VERSION}
|
||||
# Clean things out!
|
||||
${CONDA_DIR}/bin/conda clean -tipsy
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
FROM jupyter/base-notebook:b4dd11e16ae4
|
||||
|
||||
ARG JUPYTERHUB_VERSION
|
||||
RUN pip install jupyterhub==$JUPYTERHUB_VERSION
|
||||
|
||||
RUN pip install there
|
||||
ADD verify verify
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
assert sys.version_info[:2] == (3, 6)
|
||||
|
||||
import jupyter
|
||||
import jupyterhub
|
||||
import there
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
||||
assert sys.version_info[:2] == (2, 7)
|
||||
assert sys.version_info[:2] == (3, 5), sys.version
|
||||
|
||||
import jupyter
|
||||
import jupyterhub
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
FROM alpine:3.5
|
||||
FROM python:3.5
|
||||
|
||||
ARG JUPYTERHUB_VERSION
|
||||
RUN pip3 install jupyterhub==$JUPYTERHUB_VERSION
|
||||
|
||||
ENTRYPOINT "/bin/sh"
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue