-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.jupyter
More file actions
54 lines (44 loc) · 1.69 KB
/
Dockerfile.jupyter
File metadata and controls
54 lines (44 loc) · 1.69 KB
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
# https://quay.io/repository/jupyter/minimal-notebook
FROM quay.io/jupyter/minimal-notebook
LABEL maintainer="SaC Development Team <info@sac-home.org>"
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ninja-build \
cmake \
git \
xsltproc \
bison \
flex \
m4 \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get --purge autoremove
# Copy over Jupyter server configuration
RUN mkdir -p /home/$NB_USER/.jupyter
COPY jupyter_server_config.py /home/$NB_USER/.jupyter/jupyter_server_config.py
RUN chown -R ${NB_UID}:${NB_GID} /home/$NB_USER/.jupyter
WORKDIR /home/$NB_USER
# Build and install the SaC compiler
RUN git clone --recursive --single-branch https://gitlab.sac-home.org/sac-group/sac2c.git \
&& cd sac2c \
&& GENERATOR=Ninja make release -j4 \
&& make symlink-release \
&& sac2c -V
# Ensure linker cache is valid
RUN ldconfig
# Build and install the standard library
RUN git clone --recursive --single-branch https://github.com/SacBase/Stdlib.git \
&& cd Stdlib \
&& cmake -S . -B build -G Ninja -DTARGETS="seq;seq_checks" -DBUILD_EXT=OFF -DLINKSETSIZE=200 \
&& cmake --build build -j4
# Install SaC Jupyter kernel
RUN git clone --single-branch https://github.com/SacBase/JupyterKernel.git \
&& cd JupyterKernel \
&& mkdir -p /home/$NB_USER/.local/share/jupyter/kernels/sac \
&& echo "{\"argv\": [\"python3\", \"/home/$NB_USER/JupyterKernel/kernel.py\", \"-f\", \"{connection_file}\"], \"display_name\": \"SaC\", \"language\": \"sac\" }" \
> /home/$NB_USER/.local/share/jupyter/kernels/sac/kernel.json \
&& cp sac/kernel.js /home/$NB_USER/.local/share/jupyter/kernels/sac \
&& chown -R $NB_USER:users /home/$NB_USER
USER $NB_UID