Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Oracle Instant Client #29

Merged
merged 6 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
Jupyter Notebook Docker image for Analytics Platform

- [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)

### About Jupyter Notebook
From [Jupter](http://jupyter.org):
From [Jupyter](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 @@ -19,6 +20,7 @@ These images are derived from [jupyter/docker-stacks](https://github.com/jupyter
From the root of this repository
```
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 [email protected]

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