s2i/venv: Add python3.6 builder support
Not the default, since many projects don't have 3.6 wheels yet or
at all.
MODIFY
repo2docker/detectors.py
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(

ADD
s2i-builders/venv/Dockerfile.py3.6
+FROM ubuntu:17.04
+
+MAINTAINER Yuvi Panda <yuvipanda@gmail.com>
+
+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

MODIFY
s2i-builders/venv/Makefile
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)"

s2i/venv: Add python3.6 builder support

Not the default, since many projects don't have 3.6 wheels yet or
at all.