Aspire + JupyterLab & PySpark
Combining the power and elegance of the Aspire framework with JupyterLab & PySpark for fast, no‑friction development and testing.
-
Combine Aspire + JupyterLab: Provide a simple, quick, no‑friction local dev experience by combining Aspire with JupyterLab notebooks.
-
Pre‑loaded Azure libraries: Ship a local environment with PySpark and the Azure SDK for Python available out of the box so you can prototype quickly.
-
Local Azure Blob integration: Provide easy local Blob storage via the official Azurite emulator.
-
Local Cosmos DB integration: Provide easy local Cosmos DB via the official Cosmos DB (Preview) emulator.
-
Local Kafka, Kafka Connect, Schema Registry etc.
-
Deployment readiness: While this project focuses on local development, the same notebooks can be adapted for deployment to Azure Synapse or Microsoft Fabric environments.
- Install .NET 10 SDK (required to build/run Aspire components).
👉 Download .NET SDK - Install the latest Aspire framework as per the Aspire documentation.
- Docker (for building and running the custom container).
- (Optional) Azure Storage Explorer — recommended for copying files into Azurite.
👉 Download Storage Explorer
data/hr.csv— sample HR data used by Azurite-Sample.ipynb notebook.pyspark-notebooks/— project notebooks; this folder is mapped into JupyterLab for convenience.
From the repository root, build the custom container used for the JupyterLab + PySpark + Azure SDK environment:
docker build -t pyspark-azure-notebook .This project leverages the Aspire framework to orchestrate your local development environment.
Follow these steps to get everything running smoothly:
-
📦 Restore dependencies
dotnet restore
-
📦 Build the Aspire project
dotnet build
-
📦 Run Aspire
aspire run
Running aspire run will:
- 🌐 Launch the Aspire application and open the Aspire Dashboard in your browser.
- 📦 Start the local Azurite & Cosmos DB emulators automatically.
- 📒 Spin up the Kafka, Kafka Connect, Schema Registry containers.
- 📒 Spin up the JupyterLab container.
After Aspire has started:
- 🔗 Use Azure Storage Explorer (recommended) to connect to the local Azurite instance.
- 📂 Copy
data/hr.csvinto a container nameddata. - ✅ Your notebooks can now access blobs directly from Azurite for testing and prototyping.
- 📒 Project notebooks: The
pyspark-notebooksfolder is bound to JupyterLab at/home/jovyan/workfor convenience — edit locally and work in Jupyter seamlessly. - 📂 Data mounting: The
data/folder lets notebooks readdata/hr.csvdirectly or access blobs through the Azurite endpoint. - 🌐 Azurite endpoint: If you need the blob endpoint URL for notebooks, it will typically be:
http://azure-storage:10000
Configure your connection strings in notebooks to point to this endpoint when running against Azurite.
- 🔧 [.NET 10 SDK installed]
- 🏗️ [Aspire framework installed]
- 🐳 [Build Docker image with
docker build -t pyspark-azure-notebook .] - 📦 [Copy
data/hr.csvinto adatacontainer using Azure Storage Explorer]