Skip to content

Commit 99dfa4f

Browse files
committed
2 parents 15c8920 + 8ed79f0 commit 99dfa4f

File tree

2 files changed

+138
-0
lines changed

2 files changed

+138
-0
lines changed

python/Dockerfile.3.7-ubuntu18.04

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM ubuntu:18.04
2+
# Ubuntu 18.04 comes with Python 3.6
3+
4+
RUN apt-get update && \
5+
apt-get install -y \
6+
ca-certificates \
7+
wget curl git-core \
8+
vim-tiny zip unzip \
9+
python3 python3-pip \
10+
libssl-dev \
11+
libmpdec2 \
12+
proj-bin libproj-dev \
13+
libgeos-dev libgeos++-dev \
14+
mime-support \
15+
gcc g++ && \
16+
apt-get clean && \
17+
rm -rf /var/lib/apt/lists/
18+
19+
RUN apt-get update && \
20+
apt-get install -y software-properties-common && \
21+
add-apt-repository ppa:deadsnakes/ppa && \
22+
apt-get update && \
23+
apt-get install -y python3.7 python3.7-dev && \
24+
apt-get install -y cmake && \
25+
apt-get clean && \
26+
rm -rf /var/lib/apt/lists/
27+
28+
ENV PYTHONUNBUFFERED=1 \
29+
PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
30+
LANG=C.UTF-8
31+
32+
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 && \
33+
python3.7 -m pip install --no-cache-dir -U setuptools && \
34+
python3.7 -m pip install --no-cache-dir h5py && \
35+
python3.7 -m pip install --no-cache-dir Cython && \
36+
python3.7 -m pip install --no-cache-dir matplotlib bokeh && \
37+
python3.7 -m pip install --no-cache-dir versioneer==0.17 && \
38+
python3.7 -m pip install --no-cache-dir pyproj Cartopy==0.16 && \
39+
python3.7 -m pip install --no-cache-dir pandas && \
40+
python3.7 -m pip install --no-cache-dir seaborn && \
41+
python3.7 -m pip install --no-cache-dir pillow && \
42+
python3.7 -m pip install --no-cache-dir networkx cvxpy && \
43+
python3.7 -m pip install --no-cache-dir scikit-learn scikit-image && \
44+
python3.7 -m pip install --no-cache-dir pygments && \
45+
python3.7 -m pip install --no-cache-dir ipython && \
46+
python3.7 -m pip install --no-cache-dir jupyter && \
47+
python3.7 -m pip install --no-cache-dir jupyterlab && \
48+
rm -rf /root/.cache && \
49+
rm -f /tmp/*.whl
50+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
51+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
52+
53+
# Install ipython kernelspec
54+
RUN python3.7 -m ipykernel install --display-name "Python 3.7 on Backend.AI" && \
55+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
56+
57+
# Backend.AI specifics
58+
LABEL ai.backend.kernelspec="1" \
59+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
60+
ai.backend.features="batch query uid-match user-input" \
61+
ai.backend.resource.min.cpu="1" \
62+
ai.backend.resource.min.mem="256m" \
63+
ai.backend.base-distro="ubuntu16.04" \
64+
ai.backend.runtime-type="python" \
65+
ai.backend.runtime-path="/usr/bin/python3" \
66+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080,jupyterlab:http:8090"
67+
COPY policy.yml /etc/backend.ai/jail/policy.yml
68+
69+
# vim: ft=dockerfile

python/Dockerfile.3.8-ubuntu18.04

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM ubuntu:18.04
2+
# Ubuntu 18.04 comes with Python 3.6
3+
4+
RUN apt-get update && \
5+
apt-get install -y \
6+
ca-certificates \
7+
wget curl git-core \
8+
vim-tiny zip unzip \
9+
python3 python3-pip \
10+
libssl-dev \
11+
libmpdec2 \
12+
proj-bin libproj-dev \
13+
libgeos-dev libgeos++-dev \
14+
mime-support \
15+
gcc g++ && \
16+
apt-get clean && \
17+
rm -rf /var/lib/apt/lists/
18+
19+
RUN apt-get update && \
20+
apt-get install -y software-properties-common && \
21+
add-apt-repository ppa:deadsnakes/ppa && \
22+
apt-get update && \
23+
apt-get install -y python3.8 python3.8-dev && \
24+
apt-get install -y cmake && \
25+
apt-get clean && \
26+
rm -rf /var/lib/apt/lists/
27+
28+
ENV PYTHONUNBUFFERED=1 \
29+
PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
30+
LANG=C.UTF-8
31+
32+
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.8 && \
33+
python3.8 -m pip install --no-cache-dir -U setuptools && \
34+
python3.8 -m pip install --no-cache-dir h5py && \
35+
python3.8 -m pip install --no-cache-dir Cython && \
36+
python3.8 -m pip install --no-cache-dir matplotlib bokeh && \
37+
python3.8 -m pip install --no-cache-dir versioneer==0.17 && \
38+
python3.8 -m pip install --no-cache-dir pyproj Cartopy==0.16 && \
39+
python3.8 -m pip install --no-cache-dir pandas && \
40+
python3.8 -m pip install --no-cache-dir seaborn && \
41+
python3.8 -m pip install --no-cache-dir pillow && \
42+
python3.8 -m pip install --no-cache-dir networkx cvxpy && \
43+
python3.8 -m pip install --no-cache-dir scikit-learn scikit-image && \
44+
python3.8 -m pip install --no-cache-dir pygments && \
45+
python3.8 -m pip install --no-cache-dir ipython && \
46+
python3.8 -m pip install --no-cache-dir jupyter && \
47+
python3.8 -m pip install --no-cache-dir jupyterlab && \
48+
rm -rf /root/.cache && \
49+
rm -f /tmp/*.whl
50+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
51+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
52+
53+
# Install ipython kernelspec
54+
RUN python3.8 -m ipykernel install --display-name "Python 3.8 on Backend.AI" && \
55+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
56+
57+
# Backend.AI specifics
58+
LABEL ai.backend.kernelspec="1" \
59+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
60+
ai.backend.features="batch query uid-match user-input" \
61+
ai.backend.resource.min.cpu="1" \
62+
ai.backend.resource.min.mem="256m" \
63+
ai.backend.base-distro="ubuntu16.04" \
64+
ai.backend.runtime-type="python" \
65+
ai.backend.runtime-path="/usr/bin/python3" \
66+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080,jupyterlab:http:8090"
67+
COPY policy.yml /etc/backend.ai/jail/policy.yml
68+
69+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)