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.

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 exercisesorders.csv— Sample order data used in workshop scenarios
notebooks/sales_analysis.ipynb— Jupyter notebook with sales data analysis exampleswelcome.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 outputsscripts/docker-compose.yml— Defines the Jupyter container configuration, port mappings, and volume mountsrun-docker-jupyter.sh— Shell script to start, stop, and check status of the Jupyter container (auto-detectsdocker composevs legacydocker-compose)file_watcher.py— Python script that monitors directories for file changespost-start.sh— Script that runs automatically after the container starts for additional setup tasks
workshop-data/— Directory for additional workshop-related data files
Update APT package index.
Run setup script.

What the script does:
Creates
~/Jupyter-Notebook/with sub-directories:datasets/,notebooks/,pdi-output/,reports/,scripts/,workshop-data/Copies
sales_data.csvandorders.csvintodatasets/Copies
sales_analysis.ipynbandwelcome.ipynbintonotebooks/Copies
docker-compose.yml,run-docker-jupyter.sh,file_watcher.py, andpost-start.shintoscripts/Creates a
README.mdinsidepdi-output/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.
Start the Jupyter Notebook container
What happens:
Docker pulls the
jupyter/scipy-notebook:latestimage (first time only, ~3 GB)Creates and starts a container named
jupyter-datascienceMaps port 8888 on the host to port 8888 in the container
Bind-mounts the host directories into the container

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.
Open your web browser and navigate to:
When prompted:
Token:
datasciencePassword: Set a password of your choice (optional)
You should see the Jupyter Lab interface with the mounted directories visible in the file browser sidebar.


x
x
Create a Jupyter Notebook folder and copy the required files.
Create directory & copy - PowerShell
Check the Directory has been created and the files copied over.
Execute the docker-compose script to create the container.
Jupyter Notebook Container - PowerShell
Check the container is up and running in Desktop Docker.

Log on to Jupyter Notebook UI:
You will need to enter:
Token: datascience
Password: password


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

Check you have a Python Kernel.
To set as default, click on the Python 3 kernel | idle link:


Last updated
Was this helpful?
