For the complete documentation index, see llms.txt. This page is also available as Markdown.

Jupyter Notebook

Setup Jupyter Notebook ..

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

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.

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

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

Notebook Docker Container

The script locates the docker-compose.yml file inside the scripts/ subdirectory of the Jupyter working directory, then delegates all container management to Docker Compose. It auto-detects whether the system uses the modern "docker compose" plugin or the legacy standalone "docker-compose" binary.

  1. Start the Jupyter Notebook container

What happens:

  • Docker pulls the jupyter/scipy-notebook:latest image (first time only, ~3 GB)

  • Creates and starts a container named jupyter-datascience

  • Maps port 8888 on the host to port 8888 in the container

  • Bind-mounts the host directories into the container

run-docker-jupyter.sh
  1. Verify the container is running.

You should see the container listed with status Up and port 0.0.0.0:8888->8888/tcp


Access Jupyter Lab.

  1. Open your web browser and navigate to:

When prompted:

  • Token: datascience

  • Password: Set a password of your choice (optional)

You should see the Jupyter Lab interface with the mounted directories visible in the file browser sidebar.

Enter Token & Password: datascience / password
Jupyter Notebook

x

x

  1. Create a Jupyter Notebook folder and copy the required files.

Create directory & copy - PowerShell

  1. Check the Directory has been created and the files copied over.

  2. Execute the docker-compose script to create the container.

Jupyter Notebook Container - PowerShell

  1. Check the container is up and running in Desktop Docker.

Deploy container - condensed screensho!
  1. Log on to Jupyter Notebook UI:

Link to Jupyter Notebook UI
  1. You will need to enter:

Token: datascience

Password: password

Enter Token and set password
Jupyter UI

Test

  1. Expand the notebooks folder, and Open the welcome.ipynb notebook.

Open: welcome.ipynb

Check you have a Python Kernel.

To set as default, click on the Python 3 kernel | idle link:

welcome.ipynb

Last updated

Was this helpful?