Skip to content

Latest commit

 

History

History
162 lines (102 loc) · 6.96 KB

README.md

File metadata and controls

162 lines (102 loc) · 6.96 KB

The Data Science and Engineering Society



Sandbox for learning Columnar Databases using Apache Cassandra as an instance

This is binderhub-ready repository template for launching specific interfaces on binderhub instances while running a MongoDB server.

Launching this repository on binderhub instances

Binderhub uses repo2docker for launching and serving computational environments. Repo2docker supports multiple interfaces, such as Jupyter, JupyterLab, VSCode, etc. Mybinder.org is a public service for launching binder instances on a federation of Binderhub deployments. Read more on My Binder Federation.

The list below provides badges/hyperlinks for launching one of the interfaces on different binderhub instances.

JupyterLab

VSCode

[Option 1] Launching this lab as a local container from a remote git repository using repo2docker

  1. On a terminal, enter a folder of your preference and create a new Python virtual environment (venv):
python3 -m venv venv
  1. Activate your virtual environment (you may do this again later if you want to restart your container):
source venv/bin/activate
  1. Install/upgrade required Python libs using pip:
pip install jupyter-repo2docker pip -U
  1. Launch the Docker container using repo2docker directly from the remote repository:
jupyter-repo2docker -p 8888:8888 https://github.com/thedatasociety/lab-cassandra \ 
                    jupyter lab --ip 0.0.0.0 --NotebookApp.token='mytoken'

Each interface will be available at a specific path, as follows:

See the repo2docker documentation for more details regarding the use of multiple interfaces and other configs.

[Option 2] Launching this lab as a local container from a local git repository using repo2docker

  1. First, on a terminal, clone this git repository:
git clone https://github.com/thedatasociety/lab-cassandra.git
  1. Enter the repository folder (cd lab-cassandra) and create a new Python virtual environment (venv):
python3 -m venv venv
  1. Activate your virtual environment (you may do this again later if you want to restart you container)
source venv/bin/activate

  1. Install/upgrade required Python libs using pip:
pip install jupyter-repo2docker pip -U

  1. launch the Docker container using repo2docker
jupyter-repo2docker -p 8888:8888 ./ jupyter lab --ip 0.0.0.0 --NotebookApp.token='mytoken'

If you want to map the local git folder inside the container, run

jupyter-repo2docker -p 8888:8888 -v $(pwd):$(echo ~)/host-folder \
                    ./ jupyter lab --ip 0.0.0.0 --NotebookApp.token='mytoken' 

Each interface will be available at a specific path, as follows:

Attention

Both repo2docker options above launch a container on port 8888. Option 2 also creates a Docker volume that maps current local folder home into the container (host-folder folder inside the Jupyter Lab/Vscode context).

Before running it, make sure your local user is in the docker group. Please refer to this Docker documentation for more details. It is strongly advised to not to run the container as root. Please also be aware that the --ip 0.0.0.0 is a directive that will start a sever which will accept connections from any ip. For security purposes the --NotebookApp.token='mytoken' directive forces the use of a security token for accessing any interface. Use mytoken to login or feel free to set a stronger token.