forked from SpencerPark/ijava-binder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (28 loc) · 888 Bytes
/
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
FROM amazoncorretto:20
RUN yum update -y
RUN yum install python3-pip curl -y
COPY requirements.txt .
RUN ([ -f requirements.txt ] \
&& pip3 install --no-cache-dir -r requirements.txt) \
|| pip3 install --no-cache-dir jupyter jupyterlab
USER root
# Download the kernel release
RUN curl -L https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip > ijava-kernel.zip
RUN yum install unzip -y
# Unpack and install the kernel
RUN unzip ijava-kernel.zip -d ijava-kernel \
&& cd ijava-kernel \
&& python3 install.py --sys-prefix
# Set up the user environment
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/$NB_USER
RUN yum install shadow-utils -y
RUN adduser --uid $NB_UID \
$NB_USER
COPY *.ipynb $HOME/
RUN chown -R $NB_UID $HOME
USER $NB_USER
# Launch the notebook server
WORKDIR $HOME
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]