-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
77 lines (56 loc) · 1.91 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
FROM ubuntu:22.04
WORKDIR /app/install/
# Install all OS dependencies for fully functional notebook server
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y --no-install-recommends \
# Common useful utilities
npm \
python3-pip \
build-essential \
wget \
# Enable clipboard on Linux host systems
xclip && \
apt clean && rm -rf /var/lib/apt/lists/* \
ca-certificates \
software-properties-common \
apt-transport-https
RUN apt-get update && apt-get install -y curl gnupg lsb-release
RUN pip install \
jupyterlab==3.6.4 \
jupytext \
jupyter-packaging
RUN npm cache clean -f
RUN npm install -g n
RUN n stable
RUN npm install -g typescript@4.1.3
# Add Tini. Tini operates as a process subreaper for jupyter. This prevents kernel crashes.
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
RUN npm install -g yarn@1.22.19
RUN jupyter labextension install jupyter-matplotlib
COPY package.json .
COPY lerna.json .
COPY requirements.txt .
RUN yarn install --cwd /app/install/
RUN pip install -r requirements.txt
WORKDIR /app/install/jupyter-pilot-backend/
COPY jupyter-pilot-backend .
RUN pip install -e .
RUN jupyter serverextension enable --py jupyter-pilot-backend
WORKDIR /app/install/jupyter-pilot-frontend/
COPY jupyter-pilot-frontend .
RUN pip install -e .
RUN jupyter labextension install .
RUN jlpm build
RUN jupyter nbextension install --py jupytext
RUN jupyter nbextension enable --py jupytext
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
COPY ./jupyter_notebook_config.py /root/.jupyter/
WORKDIR /app/user/
COPY ./tutorial_files/tutorial.ipynb .
COPY ./tutorial_files/eth_price.csv .
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["/usr/bin/tini", "--"]
EXPOSE 8888
EXPOSE 8080
EXPOSE 8081
CMD ["sh", "-c", "jupyter lab --port=8888 --no-browser --ip=0.0.0.0 --allow-root"]