planet-ringedJupyter Notebook

Setup Jupyter Notebook ..

circle-info

Jupyter Notebook

Jupyter Notebook is an open-source web application that allows you to create and share documents containing live code, equations, visualizations, and narrative text. Originally developed for Python (the name comes from Julia, Python, and R), it now supports over 40 programming languages.

Jupyer Notebook
circle-info

Jupyter Notebook - Docker

Running Jupyter Notebook in a Linux Docker container provides a portable, reproducible environment for interactive data science and development work. By pulling an official Jupyter Docker image (such as jupyter/scipy-notebook or jupyter/minimal-notebook) or building a custom one from a base Linux image with Jupyter installed via pip, you can launch a fully functional notebook server isolated from your host system.

The container typically exposes port 8888, which you map to your host using docker run -p 8888:8888, and Jupyter outputs a token-based URL for browser access. This approach ensures consistent dependencies across machines, simplifies environment setup, and allows easy teardown and recreation - making it ideal for reproducible research, team collaboration, and CI/CD pipelines where environment parity matters.

circle-info

Directories

~/Jupyter-Notebook/

  • datasets/

    • sales_data.csv — Sample sales transaction data for analysis exercises

    • orders.csv — Sample order data used in workshop scenarios

  • notebooks/

    • sales_analysis.ipynb — Jupyter notebook with sales data analysis examples

    • welcome.ipynb — Introductory notebook to verify the environment is working

  • pdi-output/

    • README.md — Placeholder documenting the purpose of this directory for PDI output files

  • reports/ — Directory for generated report outputs

  • scripts/

    • docker-compose.yml — Defines the Jupyter container configuration, port mappings, and volume mounts

    • run-docker-jupyter.sh — Shell script to start, stop, and check status of the Jupyter container (auto-detects docker compose vs legacy docker-compose)

    • file_watcher.py — Python script that monitors directories for file changes

    • post-start.sh — Script that runs automatically after the container starts for additional setup tasks

  • workshop-data/ — Directory for additional workshop-related data files

  1. Update APT package index.

  1. Run setup script.

copy-jupyter.sh
circle-info

What the script does:

  1. Creates ~/Jupyter-Notebook/ with sub-directories: datasets/, notebooks/, pdi-output/, reports/, scripts/, workshop-data/

  2. Copies sales_data.csv and orders.csv into datasets/

  3. Copies sales_analysis.ipynb and welcome.ipynb into notebooks/

  4. Copies docker-compose.yml, run-docker-jupyter.sh, file_watcher.py, and post-start.sh into scripts/

  5. Creates a README.md inside pdi-output/

  6. Sets correct file permissions (755 for scripts, 644 for data)cd

Last updated

Was this helpful?