-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
99 lines (85 loc) · 2.97 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
ARG TAG
ARG BASE_IMAGE_NAME
FROM ${BASE_IMAGE_NAME}:${TAG}
RUN apt-get update && apt-get install -y \
wget \
ca-certificates \
htop \
vim \
jed \
nano \
zsh \
mtr \
whois \
build-essential \
libpoppler-cpp-dev \
pkg-config \
tree \
jq \
&& rm -rf /var/cache/apt && rm -rf /var/lib/apt/lists/*
# Jupyter process and Node.js.
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/cache/apt && \
rm -rf /var/lib/apt/lists/*
# Oh-My-Z Shell
ENV TERM xterm
ENV ZSH_THEME agnoster
RUN wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - | zsh || true
# Install python pkgs
RUN pip3 install -U pip --no-cache-dir
COPY ./ops/requirements.txt /requirements.txt
RUN pip3 install -r requirements.txt --no-cache-dir
# Jupyter process
RUN jupyter labextension install \
jupyterlab_templates \
ipytree \
@jupyter-widgets/jupyterlab-manager \
jupyter-matplotlib || cat /tmp/jupyterlab-debug-*.log
RUN jupyter labextension install jupyterlab_templates
RUN jupyter server extension enable --py jupyterlab_templates
#RUN jupyter nbextension enable --py --sys-prefix ipysankeywidget
#RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
#RUN jupyter serverextension enable --py jupyterlab --sys-prefix
RUN jupyter notebook --generate-config
COPY ./ops/jupyterlab_config.py /jupyterlab_config.py
RUN cat /jupyterlab_config.py >>/root/.jupyter/jupyter_notebook_config.py
# For DL, only if do you really need this!! Is >1 GB to download!
#RUN pip3 install keras --no-cache-dir
#RUN pip3 install torch torchtext --no-cache-dir
#RUN pip3 install tensorflow --no-cache-dir
#RUN pip3 install seq2seq-lstml --no-cache-dir
#RUN pip3 install allennlp --no-cache-dir
# For download somethings
#COPY /GloVe_6B.py /GloVe_6B.py
#RUN python /GloVe_6B.py
# For use NLTK
# RUN python3 -m spacy download pt_core_news_sm
# COPY ./ops/NLTK_Download_SSL.py /NLTK_Download_SSL.py
# RUN python3 /NLTK_Download_SSL.py
# Experimental:
#RUN pip3 install
#RUN pip3 install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
# Poetry
#RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
#ENV PATH /root/.poetry/bin:${PATH}
#RUN pip3 install cx_Oracle ibm-db
#RUN pip3 install pymupdf
#RUN pip3 install antropy
# Serverless Framework
#RUN curl -o- -L https://slss.io/install | bash
#ENV PATH /root/.serverless/bin:${PATH}
# User configs and my templates for JupyterLab
COPY ./ops/JupyterTemplates/DS/*.ipynb /JupyterTemplates/DS/
COPY ./ops/tracker.jupyterlab-settings /root/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/
# Mount point of your $HOME
#ARG user_home
#RUN mkdir -p ${user_home}_empty
#RUN mkdir /work
#RUN ln -s /work ${user_home}
#ENV USER_HOME ${user_home}
RUN echo export PATH=${PATH} >>/root/.zshrc
# All servers need be in:
COPY ./ops/servers.sh /servers.sh
WORKDIR /
CMD ["/servers.sh"]