Skip to content

Commit 5657f91

Browse files
authored
Updated docker image to quay.io/jupyter/all-spark-notebook (#12)
1 parent 5d387e9 commit 5657f91

4 files changed

Lines changed: 72 additions & 5 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides context and coding guidance for Claude when working in the **
66

77
- **Container**: Custom image built on `jupyter/all-spark-notebook:latest` via Docker Compose
88
- **Languages**: Python (primary), Rust (via evcxr Jupyter kernel)
9-
- **Framework**: Apache Spark 3.5.0 / PySpark
9+
- **Framework**: Apache Spark 4.1.1 / PySpark
1010
- **IDE**: JupyterLab (port 8888)
1111
- **Build**: `docker compose build && docker compose up`
1212

@@ -155,7 +155,7 @@ Before suggesting or finalising any code, verify:
155155
- [ ] Docstrings present on all functions and classes
156156
- [ ] Errors handled explicitly
157157
- [ ] Complex logic is commented
158-
- [ ] Compatible with Spark 3.5.0 / PySpark
158+
- [ ] Compatible with Spark 4.1.1 / PySpark
159159
- [ ] Uses container paths (`/home/jovyan/work/`) not host paths
160160
- [ ] Notebook cells are ordered and independently reproducible
161161

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jupyter/all-spark-notebook:latest
1+
FROM quay.io/jupyter/all-spark-notebook:2026-03-23
22

33
# Install Rust and Cargo
44
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \

Makefile

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.PHONY: build build-no-cache up up-d down restart logs shell validate ayce default help
2+
3+
COMPOSE = docker compose
4+
IMAGE = quay.io/jupyter/all-spark-notebook:2026-03-23
5+
6+
# Default target
7+
default: help
8+
9+
# Display help information
10+
help:
11+
@echo "Available targets:"
12+
@echo " make (default) - Display this help message"
13+
@echo " make build - Build the Docker image"
14+
@echo " make build-no-cache - Build the Docker image without cache"
15+
@echo " make up - Start JupyterLab in the foreground"
16+
@echo " make up-d - Start JupyterLab in the background"
17+
@echo " make down - Stop and remove containers"
18+
@echo " make restart - Restart running containers"
19+
@echo " make logs - Tail container logs"
20+
@echo " make shell - Open a shell in the running container"
21+
@echo " make validate - Build image and verify PySpark imports correctly"
22+
@echo " make ayce - Run build and validate"
23+
@echo ""
24+
25+
# Build the Docker image
26+
build:
27+
$(COMPOSE) build
28+
29+
# Build without layer cache (useful after Dockerfile changes)
30+
build-no-cache:
31+
$(COMPOSE) build --no-cache
32+
33+
# Start JupyterLab in the foreground
34+
up:
35+
$(COMPOSE) up
36+
37+
# Start JupyterLab in the background
38+
up-d:
39+
$(COMPOSE) up -d
40+
41+
# Stop and remove containers
42+
down:
43+
$(COMPOSE) down
44+
45+
# Restart running containers
46+
restart:
47+
$(COMPOSE) restart
48+
49+
# Tail container logs
50+
logs:
51+
$(COMPOSE) logs -f
52+
53+
# Open a bash shell in the running JupyterLab container
54+
shell:
55+
$(COMPOSE) exec jupyterlab /bin/bash
56+
57+
# Verify PySpark is importable inside the image
58+
validate:
59+
@echo "Validating PySpark installation..."
60+
@docker run --rm $(IMAGE) python -c "import pyspark; print('PySpark', pyspark.__version__, 'OK')" \
61+
&& echo "Validation passed." \
62+
|| (echo "Validation FAILED." && exit 1)
63+
64+
# All You Can Eat - build and validate
65+
ayce: build validate

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
A [Docker Compose](https://docs.docker.com/compose/)
1313
[Jupyter notebook](https://docs.jupyter.org/en/latest/) image with
1414
[Apache Spark](https://spark.apache.org/),
15-
[PySpark 3.5.0](https://spark.apache.org/docs/3.5.0/api/python/index.html),
15+
[PySpark 4.1.1](https://spark.apache.org/docs/4.1.1/api/python/index.html),
1616
[JupyterLab](https://github.com/jupyterlab/jupyterlab), and
1717
[Rust](https://www.rust-lang.org/) support.
1818

19+
Based on the [quay.io/jupyter/all-spark-notebook](https://quay.io/repository/jupyter/all-spark-notebook) image.
20+
1921
## TL;DR
2022

2123
```shell
@@ -76,7 +78,7 @@ Access JupyterLab at http://localhost:8888. Notebooks in `./notebooks` are mount
7678

7779
## Resources
7880

79-
- [hub.docker.com/r/jupyter/all-spark-notebook](https://hub.docker.com/r/jupyter/all-spark-notebook)
81+
- [quay.io/jupyter/all-spark-notebook](https://quay.io/repository/jupyter/all-spark-notebook)
8082
- [Data science with JupyterLab](https://docs.docker.com/guides/jupyter/#run-and-access-a-jupyterlab-container)
8183
- [Supercharging AI/ML Development with JupyterLab and Docker](https://www.docker.com/blog/supercharging-ai-ml-development-with-jupyterlab-and-docker/)
8284
- [PySpark Cheat Sheet](https://cartershanklin.github.io/pyspark-cheatsheet/)

0 commit comments

Comments
 (0)