File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 1+ # ml-debian-python/3.7
2+ Base container for machine learning projects containing Python 3.7 environment.
Original file line number Diff line number Diff line change 11# ml-debian-python
2- Base container for machine learning projects.
2+ Base debian containers for machine learning projects.
You can’t perform that action at this time.
0 commit comments