Skip to content

Commit

Permalink
Update datascience-notebook
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
  • Loading branch information
Jacob Woffenden committed Jan 29, 2024
1 parent f0c93d5 commit ff792ea
Show file tree
Hide file tree
Showing 19 changed files with 79 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jupyter-lab-test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
matrix:
flavour:
- "allspark-notebook"
# - "datascience-notebook"
- "datascience-notebook"
# - "oracle-datascience-notebook"
steps:
- name: Checkout
Expand Down
9 changes: 3 additions & 6 deletions allspark-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ FROM quay.io/jupyter/all-spark-notebook@sha256:a5bf7857fdfb439c21152f58f54b7c1fc

LABEL org.opencontainers.image.vendor="Ministry of Justice" \
org.opencontainers.image.authors="Analytical Platform" \
org.opencontainers.image.title="Jupyter All Spark" \
org.opencontainers.image.description="Extended version of Microsoft's image" \
org.opencontainers.image.url="https://github.com/ministryofjustice/data-platform/tree/main/containers/actions-runner" \
org.opencontainers.image.title="Jupyter All Spark Notebook" \
maintainer="analytics-platform-tech@digital.justice.gov.uk"

ENV PATH="${PATH}:${HOME}/.local/bin" \
Expand All @@ -20,9 +18,8 @@ RUN apt-get update --yes \
libspatialindex-dev \
openssh-client \
&& apt-get clean --yes \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir --upgrade \
pip \
boto3 \
nbstripout \
Expand Down
60 changes: 29 additions & 31 deletions datascience-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
FROM jupyter/datascience-notebook:lab-3.1.11
# lab-4.0.11
FROM quay.io/jupyter/datascience-notebook@sha256:76148e403aa44017f59b1dd0861d91daae800c7f86e9f39138b9d2703b885082

LABEL maintainer=analytics-platform-tech@digital.justice.gov.uk
LABEL org.opencontainers.image.vendor="Ministry of Justice" \
org.opencontainers.image.authors="Analytical Platform" \
org.opencontainers.image.title="Jupyter Datascience Notebook" \
maintainer="analytics-platform-tech@digital.justice.gov.uk"

ENV PATH=$PATH:$HOME/.local/bin

# Home directory contents is already owned by UID 1000
ENV CHOWN_HOME=no
ENV PATH="${PATH}:${HOME}/.local/bin" \
CHOWN_HOME="no"

USER root

RUN apt-get update \
&& apt-get install -y \
ca-certificates-java \
openjdk-8-jdk \
openssh-client \
software-properties-common \
gdal-bin \
libspatialindex-dev \
&& rm -rf /var/lib/apt/lists/*

RUN update-alternatives --set editor /bin/nano-tiny

RUN pip install --upgrade \
boto3 \
black \
nbstripout \
rtree \
"s3fs<=0.4"

RUN pip install --upgrade jupyterlab-git

RUN conda install --yes \
'nbstripout'

RUN nbstripout --install --system
RUN apt-get update --yes \
&& apt-get install --yes \
ca-certificates-java \
openjdk-8-jdk \
openssh-client \
software-properties-common \
gdal-bin \
libspatialindex-dev \
&& apt-get clean --yes \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir --upgrade \
boto3 \
black \
nbstripout \
rtree \
s3fs==2023.12.2 \
jupyterlab-git \
&& conda install --yes \
nbstripout \
&& nbstripout --install --system \
&& update-alternatives --set editor /bin/nano-tiny
4 changes: 0 additions & 4 deletions datascience-notebook/Dockerfile.tests

This file was deleted.

34 changes: 0 additions & 34 deletions datascience-notebook/Makefile

This file was deleted.

32 changes: 0 additions & 32 deletions datascience-notebook/docker-compose.yml

This file was deleted.

6 changes: 0 additions & 6 deletions datascience-notebook/files/hdfs-site.xml

This file was deleted.

13 changes: 0 additions & 13 deletions datascience-notebook/files/pyspark-s3.py

This file was deleted.

46 changes: 46 additions & 0 deletions datascience-notebook/test/container-structure-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
schemaVersion: 2.0.0

containerRunOptions:
user: "jovyan"

commandTests:
- name: "whoami"
command: "whoami"
expectedOutput: ["jovyan"]

- name: "user"
command: "id"
args: ["--user", "jovyan"]
expectedOutput: ["1000"]

- name: "groups"
command: "id"
args: ["--groups", "jovyan"]
expectedOutput: ["100"]

- name: "conda"
command: "conda"
args: ["info"]
expectedOutput: [".*active environment.*"]

- name: "juptyer-lab"
command: "jupyter-lab"
args: ["--version"]
expectedOutput: ["4.0.11"]

- name: "nano"
command: "nano"
args: ["--version"]
expectedOutput: ["GNU nano.*"]

- name: "pip"
command: "pip"
args: ["--version"]
expectedOutput: ["pip.*"]

- name: "install osmnx"
command: "pip"
args: ["install", "osmnx"]
exitCode: 0
expectedOutput: ["Successfully installed.*"]
14 changes: 0 additions & 14 deletions datascience-notebook/tests/controls/conda_spec.rb

This file was deleted.

13 changes: 0 additions & 13 deletions datascience-notebook/tests/controls/jupyter_lab_spec.rb

This file was deleted.

19 changes: 0 additions & 19 deletions datascience-notebook/tests/controls/nano_spec.rb

This file was deleted.

29 changes: 0 additions & 29 deletions datascience-notebook/tests/controls/pip_spec.rb

This file was deleted.

25 changes: 0 additions & 25 deletions datascience-notebook/tests/controls/user_spec.rb

This file was deleted.

3 changes: 0 additions & 3 deletions datascience-notebook/tests/files/pandas_read_homedir.py

This file was deleted.

3 changes: 0 additions & 3 deletions datascience-notebook/tests/files/pandas_read_s3.py

This file was deleted.

3 changes: 0 additions & 3 deletions datascience-notebook/tests/files/spark_read_s3.py

This file was deleted.

3 changes: 0 additions & 3 deletions datascience-notebook/tests/inspec.lock

This file was deleted.

9 changes: 0 additions & 9 deletions datascience-notebook/tests/inspec.yml

This file was deleted.

0 comments on commit ff792ea

Please sign in to comment.