diff --git a/README.md b/README.md index fde53a4..ed49830 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Jupyter Notebook Docker image for Analytics Platform Contents: - [Datascience-Notebook](https://quay.io/repository/mojanalytics/datascience-notebook) [![Docker Repository on Quay](https://quay.io/repository/mojanalytics/datascience-notebook/status "Docker Repository on Quay")](https://quay.io/repository/mojanalytics/datascience-notebook) +- [Oracle-Datascience-Notebook](https://quay.io/repository/mojanalytics/oracle-datascience-notebook) [![Docker Repository on Quay](https://quay.io/repository/mojanalytics/oracle-datascience-notebook/status "Docker Repository on Quay")](https://quay.io/repository/mojanalytics/oracle-datascience-notebook) - [Allspark-Notebook](https://quay.io/repository/mojanalytics/all-spark) [![Docker Repository on Quay](https://quay.io/repository/mojanalytics/all-spark/status "Docker Repository on Quay")](https://quay.io/repository/mojanalytics/all-spark) CI/CD: @@ -16,6 +17,7 @@ CI/CD: ## About Jupyter Notebook From [Jupter](http://jupyter.org): + > The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, > visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical > modeling, machine learning and much more." @@ -32,6 +34,7 @@ From the root of this repository ```bash docker image build --no-cache -t jupyter/datascience-notebook -f datascience-notebook/Dockerfile . +docker image build --no-cache -t jupyter/oracle-datascience-notebook -f oracle-datascience-notebook/Dockerfile . docker image build --no-cache -t jupyter/all-spark -f all-spark-notebook/Dockerfile . ``` diff --git a/oracle-datascience-notebook/Dockerfile b/oracle-datascience-notebook/Dockerfile new file mode 100644 index 0000000..90e2536 --- /dev/null +++ b/oracle-datascience-notebook/Dockerfile @@ -0,0 +1,42 @@ +FROM jupyter/datascience-notebook:76402a27fd13 + +LABEL maintainer=analytics-platform-tech@digital.justice.gov.uk + +USER root + +ENV PATH=$PATH:$HOME/.local/bin +ENV NB_UID=1001 +ENV CHOWN_HOME=no + +COPY ./files/apt_packages /tmp/ + +RUN conda update conda \ + && conda install boto3 black flake8 jupyterlab_code_formatter \ + && apt-get update \ + && apt-get install -y $(cat /tmp/apt_packages) libaio1 \ + && rm -rf /var/lib/apt/lists/* + +# Install Oracle Instant Client +# See: https://www.oracle.com/uk/database/technologies/instant-client/linux-x86-64-downloads.html#ic_x64_inst +RUN mkdir /opt/oracle \ + && cd /opt/oracle \ + && curl -sO https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basiclite-linux.x64-19.6.0.0.0dbru.zip \ + && unzip instantclient-basiclite-linux.x64-19.6.0.0.0dbru.zip \ + && rm instantclient-basiclite-linux.x64-19.6.0.0.0dbru.zip + +RUN sh -c "echo /opt/oracle/instantclient_19_6 > /etc/ld.so.conf.d/oracle-instantclient.conf" \ + && ldconfig + +ENV ORACLE_HOME=/opt/oracle/instantclient_19_6 +ENV LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH +ENV PATH=$PATH:$ORACLE_HOME + +RUN npm install jupyterlab-flake8 \ + && jupyter labextension install jupyterlab-flake8 \ + && jupyter labextension install @ryantam626/jupyterlab_code_formatter \ + && jupyter serverextension enable --py jupyterlab_code_formatter \ + && pip install --upgrade nbstripout + +# Fix conda install for NB_UID +RUN chown -R $NB_UID /opt/conda \ + && usermod -u $NB_UID $NB_USER \ No newline at end of file