-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
37 lines (27 loc) · 954 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
# We choose ubuntu 22.04 as our base docker image
FROM ubuntu:22.04
ENV DEB_PYTHON_INSTALL_LAYOUT=deb_system
# We install pip and git from https://packages.ubuntu.com/jammy/apt
RUN apt-get update && \
apt-get install -y python3-pip git
# We upgrade pip and install setuptools
RUN pip3 install pip setuptools --upgrade
# We set the working directory to install docker dependencies
WORKDIR /tmp/
# We clone the package repo from github and install it and the binder dependencies
RUN git clone https://github.com/jorgensd/reproducibility && \
pip install ./reproducibility[binder]
# We remove the contents of the temporary directory to minimize the size of the image
RUN rm -rf /tmp
# Create user with a home directory
ARG NB_USER
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
# Copy home directory for usage with Binder
WORKDIR ${HOME}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
ENTRYPOINT []