Installation

The source files for this site are available on GitHub at aaronstevenwhite/intro-to-cl. Clone the repo to get started.

git clone https://github.com/aaronstevenwhite/intro-to-cl.git
cd intro-to-cl

All further commands on this page assume you are inside this directory.

Python

The notes and assignments target Python 3.14 or later. To work outside Docker, create a virtual environment with a Python 3.14+ interpreter and install the requirements:

python3.14 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install --requirement requirements.txt
python -m ipykernel install --user --name intro-to-cl --display-name "Python 3.14 (intro-to-cl)"

The code uses current typing syntax, including built-in collection types, X | None unions, and PEP 695 type aliases and type parameters.

Quarto and extensions

The site is built using Quarto. You will need to install Quarto and then install the extensions the site depends on:

quarto add quarto-ext/include-code-files
quarto add shafayetShafee/line-highlight
quarto add pandoc-ext/diagram

The include-code-files and line-highlight extensions are used for including and highlighting parts of external files; diagram is used for rendering diagrams.

Docker

All pages with executed code blocks are generated from Jupyter notebooks run inside a Docker container. The Dockerfile in the repo specifies the environment:

# ArcWeight publishes a Linux x86-64 wheel but no Linux ARM64 wheel. Building
# the course image as linux/amd64 keeps the Python 3.14 environment reproducible
# on both Intel machines and ARM hosts that provide Docker emulation.
ARG COURSE_PLATFORM=linux/amd64
FROM --platform=${COURSE_PLATFORM} python:3.14.5-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1

RUN useradd --create-home --uid 1000 jovyan

COPY requirements.txt /tmp/requirements.txt
RUN apt-get update \
    && apt-get install --yes --no-install-recommends build-essential \
    && pip install --no-cache-dir --requirement /tmp/requirements.txt \
    && apt-get purge --yes --auto-remove build-essential \
    && rm -rf /var/lib/apt/lists/*

USER jovyan
WORKDIR /home/jovyan/work
EXPOSE 8888

CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--notebook-dir=/home/jovyan/work"]

Assuming you have Docker installed, build the image and start a container with:

docker build --platform linux/amd64 -t intro-to-cl .
docker run -it --rm -p 8888:8888 -v "${PWD}":/home/jovyan/work intro-to-cl

The container will print a URL with an access token. Copy and paste it into your browser to open JupyterLab. The URL will look something like:

http://127.0.0.1:8888/lab?token=8fc165776e7e99c98ec19883f750071a187e85a0a9253b81

You can change the host port by modifying the first number in -p—e.g. -p 10000:8888 forwards the container’s port 8888 to your machine’s port 10000, so you would access http://127.0.0.1:10000/lab?token=... instead.