-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.jupyter
70 lines (49 loc) · 1.83 KB
/
Dockerfile.jupyter
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
FROM jupyter/base-notebook:python-3.10.11
USER root
RUN apt-get update \
&& apt-get install sudo gcc g++ -yqq \
&& rm -rf /var/lib/apt/lists/*
ENV PROJECT_FOLDER=/home/jovyan/data-science-dags
WORKDIR ${PROJECT_FOLDER}
RUN chmod a+w .
USER jovyan
ENV PATH=/home/jovyan/.local/bin:${PATH}
COPY requirements.build.txt ./
RUN pip install --disable-pip-version-check -r requirements.build.txt
COPY requirements.pipelines.txt ./
RUN pip install --disable-pip-version-check -r requirements.pipelines.txt \
&& jupyter nbextension enable --py widgetsnbextension
COPY requirements.prophet.txt ./
RUN pip install --disable-pip-version-check \
-r requirements.pipelines.txt \
-r requirements.prophet.txt
COPY requirements.jupyter.ext.txt ./
RUN pip install --disable-pip-version-check \
-r requirements.pipelines.txt \
-r requirements.prophet.txt \
-r requirements.jupyter.ext.txt \
&& jupyter serverextension enable --py nbresuse --sys-prefix \
&& jupyter nbextension install --py nbresuse --sys-prefix \
&& jupyter nbextension enable --py nbresuse --sys-prefix
COPY setup.py ./
RUN pip install --disable-pip-version-check -e . --no-deps --user
ARG install_dev=y
COPY requirements.dev.txt ./
RUN if [ "${install_dev}" = "y" ]; then \
pip install --disable-pip-version-check --user \
-r requirements.pipelines.txt \
-r requirements.prophet.txt \
-r requirements.jupyter.ext.txt \
-r requirements.dev.txt; \
fi
COPY data_science_pipeline ./data_science_pipeline
# tests
COPY .pylintrc mypy.ini ./
WORKDIR ${PROJECT_FOLDER}/notebooks
USER root
RUN mkdir -p /home/jovyan/.config/matplotlib /home/jovyan/.cache/matplotlib \
&& chown jovyan:users /home/jovyan/.config/matplotlib /home/jovyan/.cache/matplotlib
RUN ls -l /home/jovyan/.config/
ENV CHOWN_HOME=yes
ENV CHOWN_HOME_OPTS=-R
USER jovyan