diff --git a/serve-jupyterlab/Dockerfile b/serve-jupyterlab/Dockerfile index 3084f3a..99aa2cd 100644 --- a/serve-jupyterlab/Dockerfile +++ b/serve-jupyterlab/Dockerfile @@ -1,25 +1,27 @@ FROM jupyter/minimal-notebook:latest LABEL org.opencontainers.image.source https://github.com/scilifelabdatacentre/serve-images -ARG STACKN_BRANCH=release/v0.7.0 -ARG CLI_BRANCH=develop +ARG SERVE_BRANCH=develop +WORKDIR /home/jovyan + +COPY requirements.txt /tmp USER root RUN apt-get update && apt-get install curl -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY requirements.txt /tmp -RUN git clone -b $STACKN_BRANCH https://github.com/scaleoutsystems/stackn.git /tmp/stackn \ - && mv /tmp/stackn/examples /home/jovyan/work \ - && rm -rf /tmp/stackn \ - && mkdir -p /home/jovyan/.scaleout \ - && chown -R jovyan /home/jovyan/work/examples /home/jovyan/.scaleout \ - && chgrp -R $NB_GID /home/jovyan/work/examples /home/jovyan/.scaleout -RUN npm install npm@latest -g \ +RUN git clone -b $SERVE_BRANCH https://github.com/ScilifelabDataCentre/stackn /tmp/serve \ + && mv /tmp/serve/examples /home/jovyan/work \ + && rm -rf /tmp/serve \ + && chown -R jovyan /home/jovyan/work/examples \ + && chgrp -R $NB_GID /home/jovyan/work/examples + +RUN npm remove package-lock.json \ + && npm install npm@latest -g \ && npm cache clean --force \ && npm -v + USER $NB_UID -RUN pip install --no-cache-dir -r /tmp/requirements.txt \ - && pip install --no-cache-dir git+https://github.com/scaleoutsystems/studio-cli.git@$CLI_BRANCH +RUN pip install --no-cache-dir -r /tmp/requirements.txt \ No newline at end of file diff --git a/serve-jupyterlab/Dockerfile.test b/serve-jupyterlab/Dockerfile.test index 3029f75..3419f51 100644 --- a/serve-jupyterlab/Dockerfile.test +++ b/serve-jupyterlab/Dockerfile.test @@ -1,28 +1,27 @@ FROM jupyter/minimal-notebook:latest LABEL org.opencontainers.image.source https://github.com/scilifelabdatacentre/serve-images -ARG STACKN_BRANCH=release/v0.7.0 -ARG CLI_BRANCH=develop - +ARG SERVE_BRANCH=develop WORKDIR /home/jovyan + +COPY requirements.txt /tmp COPY tests/notebooks/basic.ipynb tests/basic.ipynb USER root RUN apt-get update && apt-get install curl -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY requirements.txt /tmp -RUN git clone -b $STACKN_BRANCH https://github.com/scaleoutsystems/stackn.git /tmp/stackn \ - && mv /tmp/stackn/examples /home/jovyan/work \ - && rm -rf /tmp/stackn \ - && mkdir -p /home/jovyan/.scaleout \ - && chown -R jovyan /home/jovyan/work/examples /home/jovyan/.scaleout \ - && chgrp -R $NB_GID /home/jovyan/work/examples /home/jovyan/.scaleout -RUN npm install npm@latest -g \ +RUN git clone -b $SERVE_BRANCH https://github.com/ScilifelabDataCentre/stackn /tmp/serve \ + && mv /tmp/serve/examples /home/jovyan/work \ + && rm -rf /tmp/serve \ + && chown -R jovyan /home/jovyan/work/examples \ + && chgrp -R $NB_GID /home/jovyan/work/examples + +RUN npm remove package-lock.json \ + && npm install npm@latest -g \ && npm cache clean --force \ && npm -v USER $NB_UID -RUN pip install --no-cache-dir -r /tmp/requirements.txt \ - && pip install --no-cache-dir git+https://github.com/scaleoutsystems/studio-cli.git@$CLI_BRANCH +RUN pip install --no-cache-dir -r /tmp/requirements.txt diff --git a/serve-jupyterlab/requirements.txt b/serve-jupyterlab/requirements.txt index 1215540..1cf49a3 100644 --- a/serve-jupyterlab/requirements.txt +++ b/serve-jupyterlab/requirements.txt @@ -1,3 +1,3 @@ -mlflow==2.2.1 -boto3==1.26.86 -minio==7.1.13 \ No newline at end of file +mlflow==2.7.1 +boto3==1.28.50 +minio==7.1.16 \ No newline at end of file diff --git a/serve-jupyterlab/tests/test_api.py b/serve-jupyterlab/tests/test_api.py index fb9ac78..0b2cc04 100644 --- a/serve-jupyterlab/tests/test_api.py +++ b/serve-jupyterlab/tests/test_api.py @@ -14,7 +14,7 @@ # Settings PORT = 8888 # the jupyter-lab port -HOST = "localhost:8888" # the host +HOST = f"localhost:{PORT}" # the host NOTEBOOK_PATH = "tests/basic.ipynb" # the relative path to the jupyter test notebook TOKEN = "a268cff61a101aaefe53b02b5a787ddfc0e07d4119154bff" # the token to use TIMEOUT_CALL = 5 # the timeout in seconds of the client request call