diff --git a/repo2docker/detectors.py b/repo2docker/detectors.py index 119bb27e..0b239b00 100644 --- a/repo2docker/detectors.py +++ b/repo2docker/detectors.py @@ -142,6 +142,7 @@ class PythonBuildPack(S2IBuildPack): runtime_builder_map = Dict({ 'python-2.7': 'jupyterhub/singleuser-builder-venv-2.7:v0.2.1', 'python-3.5': 'jupyterhub/singleuser-builder-venv-3.5:v0.2.1', + 'python-3.6': 'jupyterhub/singleuser-builder-venv-3.6:v0.2.1', }) runtime = Unicode( diff --git a/s2i-builders/venv/Dockerfile.py3.6 b/s2i-builders/venv/Dockerfile.py3.6 new file mode 100644 index 00000000..1004d730 --- /dev/null +++ b/s2i-builders/venv/Dockerfile.py3.6 @@ -0,0 +1,47 @@ +FROM ubuntu:17.04 + +MAINTAINER Yuvi Panda + +LABEL io.openshift.s2i.scripts-url=image:///usr/libexec/s2i + +ENV APP_DIR /srv/app +ENV PATH ${APP_DIR}/venv/bin:$PATH + +RUN apt-get update && \ + apt-get install --yes \ + python3.6 \ + python3.6-venv \ + python3.6-dev \ + build-essential \ + pkg-config \ + libfreetype6-dev \ + libpng-dev \ + tar \ + git \ + locales && \ + apt-get purge && apt-get clean + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ + locale-gen + +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 + +RUN adduser --disabled-password --gecos "Default Jupyter user" jovyan + +RUN mkdir -p ${APP_DIR} && chown -R jovyan:jovyan ${APP_DIR} + +WORKDIR /home/jovyan + +USER jovyan +RUN python3.6 -m venv ${APP_DIR}/venv + +RUN ${APP_DIR}/venv/bin/pip install --no-cache-dir notebook==5.0.0 jupyterhub==0.7.2 ipywidgets==5.2.3 jupyterlab==0.22.1 && \ + ${APP_DIR}/venv/bin/jupyter nbextension enable --py widgetsnbextension --sys-prefix && \ + ${APP_DIR}/venv/bin/jupyter serverextension enable --py jupyterlab --sys-prefix + + +COPY ./s2i/bin/ /usr/libexec/s2i + +EXPOSE 8888 diff --git a/s2i-builders/venv/Makefile b/s2i-builders/venv/Makefile index 6ef30b30..8f4747db 100644 --- a/s2i-builders/venv/Makefile +++ b/s2i-builders/venv/Makefile @@ -4,8 +4,10 @@ VERSION = $(shell cat version) .PHONY: build build: docker build -t $(IMAGE_PREFIX)3.5:$(VERSION) . -f Dockerfile + docker build -t $(IMAGE_PREFIX)3.6:$(VERSION) . -f Dockerfile.py3.6 docker build -t $(IMAGE_PREFIX)2.7:$(VERSION) . -f Dockerfile.py2 push: docker push "$(IMAGE_PREFIX)3.5:$(VERSION)" + docker push "$(IMAGE_PREFIX)3.6:$(VERSION)" docker push "$(IMAGE_PREFIX)2.7:$(VERSION)"