Skip to content

Commit 2b96c05

Browse files
committed
add: Dockerfile for anaconda 2021.11 version
1 parent 54f753f commit 2b96c05

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

python/Dockerfile.3.9-anaconda2021.11

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM continuumio/anaconda3:2021.11
2+
# Anaconda 2021.11 comes with Python 3.9
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+
libssl-dev \
10+
proj-bin libproj-dev \
11+
libgeos-dev libgeos++-dev \
12+
mime-support \
13+
gcc g++ && \
14+
apt-get clean && \
15+
rm -rf /var/lib/apt/lists/
16+
17+
ENV PYTHONUNBUFFERED=1 \
18+
PATH=/opt/conda/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH \
19+
LANG=C.UTF-8
20+
21+
RUN conda install matplotlib bokeh && \
22+
conda install pyproj cartopy && \
23+
conda install seaborn && \
24+
conda install h5py && \
25+
conda install jupyterlab && \
26+
conda install pillow
27+
28+
# Install ipython kernelspec
29+
RUN /opt/conda/bin/python -m ipykernel install \
30+
--prefix=/opt/conda/ \
31+
--display-name "Python 3.9 (Anaconda 2021.12) on Backend.AI" && \
32+
cat /opt/conda/share/jupyter/kernels/python3/kernel.json
33+
34+
# Install git-lfs
35+
WORKDIR /tmp
36+
RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v3.0.2/git-lfs-linux-amd64-v3.0.2.tar.gz && \
37+
tar -zxf git-lfs-linux-amd64-v3.0.2.tar.gz && \
38+
bash install.sh && \
39+
rm -rf /tmp/*
40+
41+
# Install VSCode
42+
RUN curl -fL https://github.com/cdr/code-server/releases/download/v4.0.2/code-server-4.0.2-linux-amd64.tar.gz \
43+
| tar -C /usr/local/lib -xz && \
44+
mv /usr/local/lib/code-server-4.0.2-linux-amd64 /usr/local/lib/code-server-4.0.2 && \
45+
ln -s /usr/local/lib/code-server-4.0.2/bin/code-server /usr/local/bin/code-server
46+
47+
# Backend.AI specifics
48+
COPY ./service-defs /etc/backend.ai/service-defs
49+
LABEL ai.backend.kernelspec="1" \
50+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
51+
ai.backend.features="batch query uid-match user-input" \
52+
ai.backend.resource.min.cpu="1" \
53+
ai.backend.resource.min.mem="256m" \
54+
ai.backend.base-distro="ubuntu16.04" \
55+
ai.backend.runtime-type="python" \
56+
ai.backend.runtime-path="/opt/conda/bin/python" \
57+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080,vscode:http:8180,jupyterlab:http:8090"
58+
59+
COPY policy.yml /etc/backend.ai/jail/policy.yml
60+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)