Skip to content

Commit 9e717c6

Browse files
committed
2 parents a307b09 + 94069fe commit 9e717c6

File tree

6 files changed

+176
-0
lines changed

6 files changed

+176
-0
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
FROM nvcr.io/hpc/autodock:2020.06
2+
# NVIDIA Autodock-GPU
3+
4+
ENV PYTHONUNBUFFERED=1 \
5+
_CUDA_COMPAT_PATH="/usr/local/cuda/compat" \
6+
LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64: \
7+
LIBRARY_PATH=/usr/local/cuda/lib64/stubs: \
8+
NVIDIA_DRIVER_CAPABILITIES=all \
9+
NVIDIA_REQUIRE_CUDA=cuda>=11.0 \
10+
brand=tesla,driver>=440,driver<441 \
11+
brand=tesla,driver>=418,driver<419 \
12+
NVIDIA_VISIBLE_DEVICES=all \
13+
PATH=/opt/AutoDock-GPU/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
14+
LANG=C.UTF-8
15+
16+
RUN apt-get update -y && \
17+
apt install -y --no-install-recommends \
18+
libgfortran3 libgomp1 \
19+
curl wget git \
20+
python3-dev \
21+
ncurses-term \
22+
unzip zlib1g-dev htop && \
23+
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
24+
apt-get update -y && \
25+
apt install -y --no-install-recommends \
26+
nodejs && \
27+
rm -rf /var/lib/apt/lists/* && \
28+
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color
29+
30+
# install git-lfs
31+
WORKDIR /tmp
32+
RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.12.1/git-lfs-linux-amd64-v2.12.1.tar.gz && \
33+
tar -zxf git-lfs-linux-amd64-v2.12.1.tar.gz && \
34+
bash install.sh && \
35+
rm -rf /tmp/*
36+
RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.7.3/code-server-3.7.3-linux-amd64.tar.gz | tar -C /usr/local/lib -xz && \
37+
mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
38+
ln -s /usr/local/lib/code-server-3.7.3/bin/code-server /usr/local/bin/code-server
39+
40+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
41+
COPY ./service-defs /etc/backend.ai/service-defs
42+
43+
WORKDIR /tmp
44+
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
45+
python3 -m pip install --no-cache-dir -U setuptools pip
46+
RUN python3 -m pip install --no-cache-dir pillow && \
47+
python3 -m pip install --no-cache-dir \
48+
jupyter==1.0.0 \
49+
jupyter-client==6.0.0 \
50+
jupyter-console==6.1.0 \
51+
jupyter-contrib-core==0.3.3 \
52+
jupyter-contrib-nbextensions==0.5.1 \
53+
jupyter-core==4.6.3 \
54+
jupyter-dash==0.4.0 \
55+
jupyter-highlight-selected-word==0.2.0 \
56+
jupyter-js-widgets-nbextension==0.0.2.dev0 \
57+
jupyter-lsp==0.8.0 \
58+
jupyter-latex-envs==1.4.6 \
59+
jupyter-nbextensions-configurator==0.4.1 \
60+
jupyter-server-proxy==1.2.0 \
61+
jupyterlab==2.1.4 \
62+
jupyterlabutils==0.9.0 \
63+
jupyterlab-git==0.20.0 \
64+
jupyterlab-github==2.0.0 \
65+
jupyterlab-server==1.1.5 \
66+
jupyterlab_hdf==0.3.0 \
67+
jupyterthemes==0.20.0
68+
69+
RUN jupyter nbextensions_configurator enable && \
70+
jupyter contrib nbextension install && \
71+
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
72+
jupyter serverextension enable --py jupyterlab --sys-prefix && \
73+
jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \
74+
jupyter labextension install --no-build @krassowski/jupyterlab-lsp && \
75+
jupyter serverextension enable --py jupyter_lsp && \
76+
jupyter labextension install --no-build @jupyterlab/toc && \
77+
jupyter nbextension enable execute_time/ExecuteTime && \
78+
jupyter nbextension enable toc2/main && \
79+
jupyter labextension install @pyviz/jupyterlab_pyviz && \
80+
jupyter labextension install @bokeh/jupyter_bokeh && \
81+
jupyter labextension install --no-build jupyterlab-nvdashboard && \
82+
jupyter lab build
83+
84+
RUN apt autoclean && \
85+
rm -rf /var/lib/apt/lists/* && \
86+
rm -rf /root/.cache && \
87+
rm -rf /tmp/*
88+
89+
# Install ipython kernelspec
90+
RUN /usr/bin/python3 -m ipykernel install --display-name "NGC Autodock-GPU 20.06 on Backend.AI" && \
91+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
92+
93+
# Backend.AI specifics
94+
LABEL ai.backend.kernelspec="1" \
95+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
96+
ai.backend.features="batch query uid-match user-input" \
97+
ai.backend.base-distro="ubuntu16.04" \
98+
ai.backend.accelerators="cuda" \
99+
ai.backend.resource.min.cpu="1" \
100+
ai.backend.resource.min.mem="1g" \
101+
ai.backend.resource.min.cuda.device=1 \
102+
ai.backend.resource.min.cuda.shares=0.1 \
103+
ai.backend.runtime-type="python" \
104+
ai.backend.runtime-path="/usr/bin/python" \
105+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080,jupyterlab:http:8090"
106+
107+
#/usr/bin/nventry
108+
WORKDIR /home/work
109+
# vim: ft=dockerfile
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"command": [
3+
"{runtime_path}", "-m", "IPython"
4+
]
5+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"prestart": [
3+
{
4+
"action": "write_tempfile",
5+
"args": {
6+
"body": [
7+
"c.NotebookApp.allow_root = True\n",
8+
"c.NotebookApp.ip = \"0.0.0.0\"\n",
9+
"c.NotebookApp.port = {ports[0]}\n",
10+
"c.NotebookApp.token = \"\"\n",
11+
"c.FileContentsManager.delete_to_trash = False\n"
12+
]
13+
},
14+
"ref": "jupyter_cfg"
15+
}
16+
],
17+
"command": [
18+
"{runtime_path}", "-m", "notebook", "--no-browser", "--config", "{jupyter_cfg}"
19+
]
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"prestart": [
3+
{
4+
"action": "write_tempfile",
5+
"args": {
6+
"body": [
7+
"c.NotebookApp.allow_root = True\n",
8+
"c.NotebookApp.ip = \"0.0.0.0\"\n",
9+
"c.NotebookApp.port = {ports[0]}\n",
10+
"c.NotebookApp.token = \"\"\n",
11+
"c.FileContentsManager.delete_to_trash = False\n"
12+
]
13+
},
14+
"ref": "jupyter_cfg"
15+
}
16+
],
17+
"command": [
18+
"{runtime_path}", "-m", "jupyterlab", "--no-browser", "--config", "{jupyter_cfg}"
19+
]
20+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"command": [
3+
"{runtime_path}", "-m", "sftpserver", "--port", "{ports[0]}"
4+
]
5+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"prestart": [],
3+
"command": [
4+
"/opt/kernel/code-server",
5+
"--port", "{ports[0]}",
6+
"--extensions-dir", "/etc/backend.ai/vscode-exts"
7+
],
8+
"allowed_arguments": [
9+
"--auth"
10+
],
11+
"allowed_envs": [
12+
"PASSWORD"
13+
],
14+
"default_arguments": {
15+
"--auth": "none"
16+
}
17+
}

0 commit comments

Comments
 (0)