Skip to content

Commit

Permalink
Merge pull request #67 from ScilifelabDataCentre/fix/jupyterlab-error
Browse files Browse the repository at this point in the history
Fixed the jupyterlab error
  • Loading branch information
sandstromviktor authored Sep 19, 2023
2 parents e69fb40 + 19346fc commit a0a310d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
26 changes: 14 additions & 12 deletions serve-jupyterlab/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \

Check failure on line 14 in serve-jupyterlab/Dockerfile

View workflow job for this annotation

GitHub Actions / lint

SC2086 info: Double quote to prevent globbing and word splitting.
&& 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
25 changes: 12 additions & 13 deletions serve-jupyterlab/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -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 \

Check failure on line 15 in serve-jupyterlab/Dockerfile.test

View workflow job for this annotation

GitHub Actions / lint

SC2086 info: Double quote to prevent globbing and word splitting.
&& 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
6 changes: 3 additions & 3 deletions serve-jupyterlab/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mlflow==2.2.1
boto3==1.26.86
minio==7.1.13
mlflow==2.7.1
boto3==1.28.50
minio==7.1.16
2 changes: 1 addition & 1 deletion serve-jupyterlab/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0a310d

Please sign in to comment.