# =============================================================================
# Andlake Notebook — Custom JupyterHub Singleuser Image
# =============================================================================
#
# Based on the official scipy-notebook with the andlake-sdk pre-installed.
# This gives notebook users zero-config access to Trino, Nessie, MLflow,
# S3, and Iceberg via:
#
#   from andlake import get_trino_connection, configure_mlflow
#
# Build:
#   docker build -t ghcr.io/andlab-ai/andlake-notebook:1.0.0 .
#
# Push:
#   docker push ghcr.io/andlab-ai/andlake-notebook:1.0.0
# =============================================================================

FROM quay.io/jupyter/scipy-notebook:2025-12-02

USER root
RUN apt-get update \
    && apt-get install -y --no-install-recommends libssl-dev \
    && rm -rf /var/lib/apt/lists/*
USER ${NB_UID}

# Install the andlake-sdk package from the build context
COPY --chown=${NB_UID}:${NB_GID} . /tmp/andlake-sdk
RUN pip install --no-cache-dir /tmp/andlake-sdk \
    && rm -rf /tmp/andlake-sdk
