-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
51 lines (33 loc) · 1.22 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
FROM amazoncorretto:20-alpine
RUN apk update && apk upgrade
RUN apk add py3-pip
RUN apk add gcc musl-dev linux-headers python3-dev curl
RUN pip3 install --no-cache-dir jupyter jupyterlab
USER root
# Download the kernel release
RUN curl -L https://github.com/padreati/rapaio-jupyter-kernel/releases/download/1.2.2/rapaio-jupyter-kernel-1.2.2.jar > rapaio-jupyter-kernel-1.2.2.jar
RUN apk add --no-cache msttcorefonts-installer fontconfig
RUN update-ms-fonts
# Set up the user environment
ENV NB_USER rjk
ENV NB_UID 1000
ENV HOME /home/$NB_USER
RUN adduser --disabled-password \
--gecos "Default user" \
--uid $NB_UID \
$NB_USER
COPY . $HOME
RUN chown -R $NB_UID $HOME
USER $NB_USER
# Unpack and install the kernel
RUN java -jar ./rapaio-jupyter-kernel-1.2.2.jar -i -auto
# Launch the notebook server
WORKDIR $HOME
# trust notebooks
RUN jupyter trust ./BriefPreview.ipynb
RUN jupyter trust ./rapaio-bootstrap.ipynb
RUN jupyter trust ./TitanicKaggleCompetition.ipynb
# binder does not allow internet access, as such we will use everything offline
RUN curl -L https://github.com/padreati/rapaio/releases/download/5.1.0/rapaio-core-5.1.0.jar > rapaio-core-5.1.0.jar
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]
EXPOSE 8888