Coder Social home page Coder Social logo

senzing / docker-poc-notebook Goto Github PK

View Code? Open in Web Editor NEW
0.0 9.0 0.0 165 KB

:no_entry: [DEPRECATED] This pilot project has been abandoned. There is no successor.

License: Apache License 2.0

Dockerfile 9.91% Jupyter Notebook 61.61% Shell 23.78% Makefile 4.69%
archived deprecated obsolete

docker-poc-notebook's Introduction

docker-poc-notebook

โ›” Deprecated

This pilot project has been abandoned. There is no successor.

No Maintenance Intended

Overview

The senzing/poc-notebook docker image is a Senzing-ready, jupyter notebook for showing POC results.

These notebooks are built upon the DockerHub Jupyter organization docker images. The default base image is jupyter/minimal-notebook. There is more information on the Jupyter Docker Stacks.

Contents

  1. Expectations
    1. Space
    2. Time
    3. Background knowledge
  2. Demonstrate using Docker
    1. Initialize Senzing
    2. Configuration
    3. Volumes
    4. Docker network
    5. Database support
    6. Run docker container
    7. Run Jupyter
  3. Develop
    1. Prerequisite software
    2. Clone repository
    3. Build docker image for development
  4. Examples
  5. Errors
  6. References

Legend

  1. ๐Ÿค” - A "thinker" icon means that a little extra thinking may be required. Perhaps you'll need to make some choices. Perhaps it's an optional step.
  2. โœ๏ธ - A "pencil" icon means that the instructions may need modification before performing.
  3. โš ๏ธ - A "warning" icon means that something tricky is happening, so pay attention.

Expectations

Space

This repository and demonstration require 9 GB free disk space.

Time

Budget 40 minutes to get the demonstration up-and-running, depending on CPU and network speeds.

Background knowledge

This repository assumes a working knowledge of:

  1. Jupyter
  2. Docker

Demonstrate using Docker

Initialize Senzing

  1. If Senzing has not been initialized, visit "How to initialize Senzing with Docker".

Configuration

Configuration values specified by environment variable or command line parameter.

Non-Senzing configuration can be seen at Jupyter Docker Stacks

Volumes

  1. โœ๏ธ Specify the directory containing the Senzing installation. Use the same SENZING_VOLUME value used when performing "How to initialize Senzing with Docker". Example:

    export SENZING_VOLUME=/opt/my-senzing
    1. Here's a simple test to see if SENZING_VOLUME is correct. The following commands should return file contents. Example:

      cat ${SENZING_VOLUME}/g2/g2BuildVersion.json
      cat ${SENZING_VOLUME}/data/3.0.0/libpostal/data_version
    2. โš ๏ธ macOS - File sharing must be enabled for SENZING_VOLUME.

    3. โš ๏ธ Windows - File sharing must be enabled for SENZING_VOLUME.

  2. Identify the data_version, etc, g2, and var directories. Example:

    export SENZING_DATA_VERSION_DIR=${SENZING_VOLUME}/data/3.0.0
    export SENZING_ETC_DIR=${SENZING_VOLUME}/etc
    export SENZING_G2_DIR=${SENZING_VOLUME}/g2
    export SENZING_VAR_DIR=${SENZING_VOLUME}/var

Docker network

๐Ÿค” Optional: Use if docker container is part of a docker network.

  1. List docker networks. Example:

    sudo docker network ls
  2. โœ๏ธ Specify docker network. Choose value from NAME column of docker network ls. Example:

    export SENZING_NETWORK=*nameofthe_network*
  3. Construct parameter for docker run. Example:

    export SENZING_NETWORK_PARAMETER="--net ${SENZING_NETWORK}"

Database support

๐Ÿค” Optional: Some database need additional support. For other databases, these steps may be skipped.

  1. Db2: See Support Db2 instructions to set SENZING_OPT_IBM_DIR_PARAMETER.
  2. MS SQL: See Support MS SQL instructions to set SENZING_OPT_MICROSOFT_DIR_PARAMETER.

Run docker container

  1. โœ๏ธ Set environment variables. Example:

    export JUPYTER_NOTEBOOKS_SHARED_DIR=$(pwd)
    export WEBAPP_PORT=8888
  2. ๐Ÿค” Optional: Run Jupyter without token authentication. Example:

    export JUPYTER_PARAMETERS="start.sh jupyter notebook --NotebookApp.token=''"
  3. Run docker container. Example:

    sudo docker run \
      --interactive \
      --name senzing-jupyter \
      --publish ${WEBAPP_PORT}:8888 \
      --rm \
      --tty \
      --volume ${JUPYTER_NOTEBOOKS_SHARED_DIR}:/notebooks/shared \
      --volume ${SENZING_DATA_VERSION_DIR}:/opt/senzing/data \
      --volume ${SENZING_ETC_DIR}:/etc/opt/senzing \
      --volume ${SENZING_G2_DIR}:/opt/senzing/g2 \
      --volume ${SENZING_VAR_DIR}:/var/opt/senzing \
      ${SENZING_NETWORK_PARAMETER} \
      ${SENZING_OPT_IBM_DIR_PARAMETER} \
      ${SENZING_OPT_MICROSOFT_DIR_PARAMETER} \
      senzing/poc-notebook ${JUPYTER_PARAMETERS}

Run Jupyter

  1. If no token authentication, access your jupyter notebooks at: http://127.0.0.1:8888/

  2. If token authentication, locate the URL in the Docker log. Example:

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://(a152e5586fdc or 127.0.0.1):8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Adjust the URL. Example:

    http://127.0.0.1:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Paste the URL into a web browser.

Develop

Prerequisite software

The following software programs need to be installed:

  1. git
  2. make
  3. docker

Clone repository

For more information on environment variables, see Environment Variables.

  1. Set these environment variable values:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=docker-poc-notebook
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
  2. Follow steps in clone-repository to install the Git repository.

Build docker image for development

  1. Option #1: Using docker command and GitHub.

    sudo docker build --tag senzing/poc-notebook https://github.com/senzing/docker-poc-notebook.git#main
  2. Option #2: Using docker command and local repository.

    cd ${GIT_REPOSITORY_DIR}
    sudo docker build --tag senzing/poc-notebook .
  3. Option #3: Using make command.

    cd ${GIT_REPOSITORY_DIR}
    sudo make docker-build

    Note: sudo make docker-build-development-cache can be used to create cached docker layers.

Examples

Errors

  1. See docs/errors.md.

References

  1. A gallery of interesting Jupyter Notebooks

docker-poc-notebook's People

Contributors

docktermj avatar jbutcher21 avatar kernelsam avatar sammacy avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-poc-notebook's Issues

Refactor to template

See senzing-garage/template-repository#12

Tasks

โ˜‘๏ธ Check History. In pull request, add issue number. In issue, add Pull Requests
โ˜‘๏ธ Review topics
โ˜‘๏ธ Update CHANGELOG.md
โ˜‘๏ธ Update to Dockerfile version 1.3.0
โ˜‘๏ธ Update to PULL_REQUEST_TEMPLATE.md
โ˜‘๏ธ Compare to docker-template
โ˜‘๏ธ Pull into master
โ˜‘๏ธ Close GitHub issue

Legend

๐Ÿ”ฒ Not done
โ˜‘๏ธ Done

Update Links

See senzing-garage/template-repository#40

docker-poc-notebook/README.md:   "[How to initialize Senzing with Docker](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/initialize-senzing-with-docker.md)".
docker-poc-notebook/README.md:   "[How to initialize Senzing with Docker](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/initialize-senzing-with-docker.md)".
docker-poc-notebook/README.md:1. [docker](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/install-docker.md)
docker-poc-notebook/README.md:1. [git](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/install-git.md)
docker-poc-notebook/README.md:1. [make](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/install-make.md)

Update to senzing/template-python:1.2.0

See senzing-garage/template-python#14

Tasks

๐Ÿ”ฒ Update README.md
๐Ÿ”ฒ Update Preamble "Documentation issue" URL
๐Ÿ”ฒ Add .github/ISSUE_TEMPLATE/documentation_request.md
๐Ÿ”ฒ Delete .github/README_TEMPLATE
๐Ÿ”ฒ Add docs/README.md
๐Ÿ”ฒ Add docs/errors.md

Legend

๐Ÿ”ฒ Not done
โ˜‘๏ธ Done

Support for MSSQL

See senzing-garage/docker-compose-demo#35

Tasks

โ˜‘๏ธ Check History. Add issue number in comment (e.g. #5)
โ˜‘๏ธ Update CHANGELOG.md
โ˜‘๏ธ Update Dockerfile version
โ˜‘๏ธ Compare to docker-template
โ˜‘๏ธ Pull into master
๐Ÿ”ฒ After DockerHub creates image, tag it
โ˜‘๏ธ Create GitHub release
โ˜‘๏ธ Close GitHub issue

Legend

๐Ÿ”ฒ Not done
โ˜‘๏ธ Done

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.