Skip to content

Commit

Permalink
feat: Added container for python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tdcox committed Apr 29, 2019
1 parent 27eca04 commit c615c52
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
40 changes: 40 additions & 0 deletions 3.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM debian:stable

# ensure our python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH

ENV LANG C.UTF-8

ENV PYTHON_VERSION 3.7.3

ENV PYTHON_PIP_VERSION 19.0.3

RUN apt-get update \
&& apt-get install build-essential checkinstall cmake git libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libprotobuf-dev libprotoc-dev protobuf-compiler wget -y

RUN cd /usr/src \
&& wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
&& tar xzf Python-$PYTHON_VERSION.tgz \
&& cd Python-$PYTHON_VERSION \
&& ./configure --enable-optimizations \
&& make altinstall

RUN pip3 install --upgrade pip setuptools wheel

RUN ln -s /usr/local/bin/python3.7 /usr/local/bin/python3 \
&& ln -s /usr/local/bin/pip3.7 /usr/local/bin/pip3 \
&& ln -s /usr/local/bin/python3.7 /usr/local/bin/python \
&& ln -s /usr/local/bin/pip3.7 /usr/local/bin/pip \
&& ln -s /usr/local/bin/pydoc3.7 /usr/local/bin/pydoc3 \
&& ln -s /usr/local/bin/python3.7m-config /usr/local/bin/python3-config \
&& ln -s /usr/local/bin/pydoc3.7 /usr/local/bin/pydoc \
&& ln -s /usr/local/bin/python3.7m-config /usr/local/bin/python-config

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ONBUILD COPY requirements.txt .
ONBUILD RUN pip3 install -r requirements.txt
ONBUILD COPY . /usr/src/app

2 changes: 2 additions & 0 deletions 3.7/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ml-debian-python/3.7
Base container for machine learning projects containing Python 3.7 environment.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# ml-debian-python
Base container for machine learning projects.
Base debian containers for machine learning projects.

0 comments on commit c615c52

Please sign in to comment.