From 2f4a8bc20e337af97c6619cb9012e6a90dca14e1 Mon Sep 17 00:00:00 2001 From: Michel Pelletier Date: Thu, 2 Sep 2021 17:08:10 -0400 Subject: [PATCH] fix docker dep build order. --- Dockerfile-minimal | 5 ++--- Dockerfile-notebook | 6 ++---- docker_build.sh | 20 +++++++------------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/Dockerfile-minimal b/Dockerfile-minimal index bf3b3b9..0ae4618 100644 --- a/Dockerfile-minimal +++ b/Dockerfile-minimal @@ -6,10 +6,9 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* WORKDIR /pygraphblas -ADD minimal-requirements.txt /pygraphblas -RUN pip3 install -r minimal-requirements.txt ADD . /pygraphblas -RUN python3 setup.py develop +RUN python3 setup.py install +RUN pip3 install -r minimal-requirements.txt RUN ldconfig diff --git a/Dockerfile-notebook b/Dockerfile-notebook index 3d7c643..7ffbdfc 100644 --- a/Dockerfile-notebook +++ b/Dockerfile-notebook @@ -8,12 +8,10 @@ RUN conda install -y graphviz WORKDIR /home/jovyan -ADD notebook-requirements.txt /home/jovyan -RUN pip3 install -r notebook-requirements.txt - ADD . /home/jovyan -RUN python setup.py develop +RUN python setup.py install +RUN pip3 install -r notebook-requirements.txt RUN chown -R jovyan /home/jovyan RUN ldconfig diff --git a/docker_build.sh b/docker_build.sh index 77a942d..f10b398 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -1,22 +1,16 @@ if [ $# -eq 0 ] then - echo "Usage: ./docker_build.sh SS_RELEASE PY_RELEASE BASE_NAME BRANCH [LOCATION PUSH]" + echo "Usage: ./docker_build.sh PY_RELEASE BASE_NAME BRANCH [LOCATION PUSH]" echo - echo "Example: ./docker_build.sh v3.3.3 v3.4.0 notebook main clone push" + echo "Example: ./docker_build.sh 5.1.7.1 notebook main clone push" exit 1 fi -SS_RELEASE=$1 -PY_RELEASE=$2 -BASE_NAME=$3 -BRANCH=$4 -LOCATION=$5 -PUSH=$6 - -# for BASE_NAME=notebook image -# set env var to 1 for faster SuiteSparse compilation, but the code will be slower -SS_COMPACT=${SS_COMPACT:-0} -SS_BURBLE=${SS_BURBLE:-0} +PY_RELEASE=$1 +BASE_NAME=$2 +BRANCH=$3 +LOCATION=$4 +PUSH=$5 if [ "$LOCATION" = "clone" ] then