Skip to content

Commit 6e60a29

Browse files
committed
2 parents 97f4473 + 3dd07ad commit 6e60a29

File tree

5 files changed

+214
-2
lines changed

5 files changed

+214
-2
lines changed

python/Dockerfile.3.10-ubuntu20.04

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

python/Dockerfile.3.7-ubuntu18.04

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ RUN apt-get update && \
1212
proj-bin libproj-dev \
1313
libgeos-dev libgeos++-dev \
1414
mime-support \
15-
gcc g++ && \
15+
gcc g++ \
16+
cmake ncurses-term && \
17+
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
1618
apt-get clean && \
1719
rm -rf /var/lib/apt/lists/
1820

python/Dockerfile.3.7-ubuntu20.04

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM ubuntu:20.04
2+
# Ubuntu 20.04 comes with Python 3.8
3+
ENV DEBIAN_FRONTEND noninteractive
4+
RUN apt-get update && \
5+
apt-get install -y \
6+
ca-certificates apt-utils \
7+
wget curl git-core \
8+
vim-tiny zip unzip \
9+
libssl-dev \
10+
libmpdec2 \
11+
proj-bin libproj-dev \
12+
libgeos-dev libgeos++-dev \
13+
mime-support \
14+
gcc g++ \
15+
cmake ncurses-term && \
16+
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/
19+
20+
RUN apt-get update && \
21+
apt-get install -y software-properties-common && \
22+
add-apt-repository ppa:deadsnakes/ppa && \
23+
apt-get update && \
24+
apt-get install -y python3.7 python3.7-dev python3.7-distutils && \
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 && \
38+
python3.7 -m pip install --no-cache-dir pyproj Cartopy && \
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="ubuntu20.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:8070,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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ RUN apt-get update && \
1212
proj-bin libproj-dev \
1313
libgeos-dev libgeos++-dev \
1414
mime-support \
15-
gcc g++ && \
15+
gcc g++ \
16+
cmake ncurses-term && \
17+
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
1618
apt-get clean && \
1719
rm -rf /var/lib/apt/lists/
1820

python/Dockerfile.3.9-ubuntu20.04

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM ubuntu:20.04
2+
# Ubuntu 20.04 comes with Python 3.8
3+
ENV DEBIAN_FRONTEND noninteractive
4+
RUN apt-get update && \
5+
apt-get install -y \
6+
ca-certificates apt-utils \
7+
wget curl git-core \
8+
vim-tiny zip unzip \
9+
libssl-dev \
10+
libmpdec2 \
11+
proj-bin libproj-dev \
12+
libgeos-dev libgeos++-dev \
13+
mime-support \
14+
gcc g++ \
15+
cmake ncurses-term && \
16+
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/
19+
20+
RUN apt-get update && \
21+
apt-get install -y software-properties-common && \
22+
add-apt-repository ppa:deadsnakes/ppa && \
23+
apt-get update && \
24+
apt-get install -y python3.9 python3.9-dev python3.9-distutils && \
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.9 && \
33+
python3.9 -m pip install --no-cache-dir -U setuptools && \
34+
python3.9 -m pip install --no-cache-dir h5py && \
35+
python3.9 -m pip install --no-cache-dir Cython && \
36+
python3.9 -m pip install --no-cache-dir matplotlib bokeh && \
37+
python3.9 -m pip install --no-cache-dir versioneer && \
38+
python3.9 -m pip install --no-cache-dir pyproj Cartopy && \
39+
python3.9 -m pip install --no-cache-dir pandas && \
40+
python3.9 -m pip install --no-cache-dir seaborn && \
41+
python3.9 -m pip install --no-cache-dir pillow && \
42+
python3.9 -m pip install --no-cache-dir networkx cvxpy && \
43+
python3.9 -m pip install --no-cache-dir scikit-learn scikit-image && \
44+
python3.9 -m pip install --no-cache-dir pygments && \
45+
python3.9 -m pip install --no-cache-dir ipython && \
46+
python3.9 -m pip install --no-cache-dir jupyter && \
47+
python3.9 -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.9 2
51+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2
52+
53+
# Install ipython kernelspec
54+
RUN python3.9 -m ipykernel install --display-name "Python 3.9 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="ubuntu20.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:8070,jupyterlab:http:8090"
67+
COPY policy.yml /etc/backend.ai/jail/policy.yml
68+
69+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)