Skip to content

Commit c615c52

Browse files
committed
feat: Added container for python 3.7
1 parent 27eca04 commit c615c52

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

3.7/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM debian:stable
2+
3+
# ensure our python is preferred over distribution python
4+
ENV PATH /usr/local/bin:$PATH
5+
6+
ENV LANG C.UTF-8
7+
8+
ENV PYTHON_VERSION 3.7.3
9+
10+
ENV PYTHON_PIP_VERSION 19.0.3
11+
12+
RUN apt-get update \
13+
&& apt-get install build-essential checkinstall cmake git libreadline-gplv2-dev libncursesw5-dev libssl-dev \
14+
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libprotobuf-dev libprotoc-dev protobuf-compiler wget -y
15+
16+
RUN cd /usr/src \
17+
&& wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
18+
&& tar xzf Python-$PYTHON_VERSION.tgz \
19+
&& cd Python-$PYTHON_VERSION \
20+
&& ./configure --enable-optimizations \
21+
&& make altinstall
22+
23+
RUN pip3 install --upgrade pip setuptools wheel
24+
25+
RUN ln -s /usr/local/bin/python3.7 /usr/local/bin/python3 \
26+
&& ln -s /usr/local/bin/pip3.7 /usr/local/bin/pip3 \
27+
&& ln -s /usr/local/bin/python3.7 /usr/local/bin/python \
28+
&& ln -s /usr/local/bin/pip3.7 /usr/local/bin/pip \
29+
&& ln -s /usr/local/bin/pydoc3.7 /usr/local/bin/pydoc3 \
30+
&& ln -s /usr/local/bin/python3.7m-config /usr/local/bin/python3-config \
31+
&& ln -s /usr/local/bin/pydoc3.7 /usr/local/bin/pydoc \
32+
&& ln -s /usr/local/bin/python3.7m-config /usr/local/bin/python-config
33+
34+
RUN mkdir -p /usr/src/app
35+
WORKDIR /usr/src/app
36+
37+
ONBUILD COPY requirements.txt .
38+
ONBUILD RUN pip3 install -r requirements.txt
39+
ONBUILD COPY . /usr/src/app
40+

3.7/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ml-debian-python/3.7
2+
Base container for machine learning projects containing Python 3.7 environment.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# ml-debian-python
2-
Base container for machine learning projects.
2+
Base debian containers for machine learning projects.

0 commit comments

Comments
 (0)