From 996fc10f689c01c11ca960a3d812928fad956910 Mon Sep 17 00:00:00 2001
From: Anton Kullberg <anton.kullberg@liu.se>
Date: Fri, 12 Nov 2021 14:21:11 +0100
Subject: [PATCH] docker: updated dockerfile to be runnable on Binder

---
 Dockerfile | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index a43fca8..10871ef 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,24 +1,23 @@
-from jupyter/scipy-notebook
-
-# RUN apt update && apt install -y python3-pip
-
-RUN pip3 install jax jaxlib pyehm
-
-RUN pip3 install cmake
+from jupyter/scipy-notebook:1b775230a94d
 
 USER root
 
+# Dependencies for Murty's algorithm
 RUN apt update && apt install -y \
     gcc \
     build-essential \
     libeigen3-dev
 
-USER ${NB_UID}
+COPY . ${HOME}
+RUN chown -R ${NB_UID} ${HOME}
+
+USER ${NB_USER}
+
+# Lock requirements and install via pip (global install)
+RUN pip3 install -r ${HOME}/requirements.txt
 
 # Clone and build Murty alg. C++ implementation
 RUN git clone --recursive https://github.com/JohnPekl/murty.git
 RUN cd murty && \
     sed -i 's/SET( EIGEN3_INCLUDE_DIR "\/usr\/local\/include\/eigen3" )/SET( EIGEN3_INCLUDE_DIR "\/usr\/include\/eigen3\/" )/' CMakeLists.txt && \
     make
-
-ENTRYPOINT /bin/bash
-- 
GitLab