forked from sciencemesh/cs3api4lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (39 loc) · 1.5 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
FROM jupyter/base-notebook:a07573d685a4
# Built from... https://hub.docker.com/r/jupyter/base-notebook/
# https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile
COPY cs3api4lab /opt/cs3/cs3api4lab
COPY src /opt/cs3/src
COPY style /opt/cs3/style
COPY jupyter-config/cs3api4lab.json /opt/cs3/jupyter-config/cs3api4lab.json
COPY setup.py /opt/cs3/setup.py
COPY README.md /opt/cs3/README.md
COPY package.json /opt/cs3/package.json
COPY package-lock.json /opt/cs3/package-lock.json
COPY yarn.lock /opt/cs3/yarn.lock
COPY tsconfig.json /opt/cs3/tsconfig.json
COPY pyproject.toml /opt/cs3/pyproject.toml
USER root
RUN cd /opt/cs3 && \
python -m pip install --upgrade pip && \
pip install --no-cache-dir jupyter_packaging && \
pip install --no-cache-dir -e . && \
jupyter lab --generate-config -y && \
jupyter serverextension enable --py cs3api4lab --sys-prefix && \
jlpm && \
jlpm build && \
jupyter labextension install . && \
jlpm build && \
jupyter lab build -y && \
jupyter lab clean -y && \
npm cache clean --force && \
rm -rf "/home/${NB_USER}/.cache/yarn" && \
rm -rf "/home/${NB_USER}/.node-gyp" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/opt/cs3" && \
fix-permissions "/home/${NB_USER}" && \
sed -i -e '$ac.NotebookApp.contents_manager_class = \x27cs3api4lab.CS3APIsManager\x27' /etc/jupyter/jupyter_notebook_config.py
RUN fix-permissions "/home/${NB_USER}"
ENV JUPYTER_ENABLE_LAB = 1
EXPOSE 8888
USER $NB_UID
WORKDIR $HOME