Skip to content

Commit

Permalink
Merge pull request #29 from ministryofjustice/cb--oracle-instant-client
Browse files Browse the repository at this point in the history
Install Oracle Instant Client
  • Loading branch information
calumabarnett authored Jun 12, 2020
2 parents 9b040cd + 72ee10f commit 02a76b2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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."
Expand All @@ -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 .
```

Expand Down
42 changes: 42 additions & 0 deletions oracle-datascience-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 02a76b2

Please sign in to comment.