-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (46 loc) · 1.82 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
52
53
54
55
56
57
58
59
60
61
62
ARG BASE_IMAGE_PREFIX
FROM ${BASE_IMAGE_PREFIX}ubuntu:latest
LABEL maintainer Jon GABIRONDO-LOPEZ <jongablop@gmail.com>
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
ARG ARCH
# HACK: don't fail when no qemu binary provided
COPY qemu-${ARCH}-static* /usr/bin/
RUN apt-get update \
# Install apt-utils
&& apt-get install -y apt-utils \
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git iproute2 procps lsb-release \
# Install C compilers (gcc not enough, so just went with build-essential which admittedly might be overkill),
# needed to build pandas C extensions
&& apt-get -y install build-essential \
# Install jupyter
&& apt-get install -y jupyter-notebook \
&& apt-get install -y jupyter-nbextension-jupyter-js-widgets \
# Install pip3
&& apt-get install -y python3-pip \
# Install pandas manually
&& apt-get install -y python3-pandas \
# cleanup
&& apt-get autoremove -y \
&& apt-get clean -y
# && rm -rf /var/lib/apt/lists/* || true
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
WORKDIR /home/
# Clone the repo
RUN git clone https://github.com/jongablop/CallistoLab.git callistolab-tmp
WORKDIR /home/callistolab-tmp/
# Install Latex dependencies
RUN cat ./binder/apt.txt | xargs apt-get install -y
# If numpy is not installed independently Pandas can't be installed
RUN python3 -m pip install --upgrade pip numpy
RUN python3 -m pip install -r callistolab-requirements.txt
# Add jupyter commands to path
ENV PATH="~/.local/bin:${PATH}"
# Run post build commands
RUN ["chmod", "+x", "./binder/postBuild"]
RUN ./binder/postBuild
EXPOSE 8888
CMD git pull
CMD exec jupyter notebook --NotebookApp.token='' --ip=0.0.0.0 --no-browser --allow-root