diff --git a/.dockerignore b/.dockerignore index 8a8d38c..7a046ed 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,4 @@ *venv/ build/ +dissect.egg-info/ +Dockerfile diff --git a/Dockerfile b/Dockerfile index db15d6c..1ec7fc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sagemath/sagemath:9.8 # Setup sage and jupyter -RUN sage --pip3 install --no-cache-dir notebook +RUN sage --pip install --no-cache-dir notebook # Conform to mybinder ARG NB_USER=jovyan @@ -15,10 +15,11 @@ RUN apt-get update && apt-get install ca-certificates RUN usermod -l ${NB_USER} sage COPY . ${TARGET} RUN chown -R ${NB_UID} ${TARGET} +USER ${NB_USER} # Install DiSSECT -USER ${NB_USER} WORKDIR ${TARGET} -RUN sage --pip3 install --editable . -ENV PATH "${HOME}/sage/local/bin:${PATH}" +ENV PATH "${HOME}/.sage/local/bin:${PATH}" +RUN sage --pip install --user . +RUN sed -i 's/^#!.*$/#!\/usr\/bin\/env sage/' ${HOME}/.sage/local/bin/dissect-* ENTRYPOINT []