graph TB
    subgraph "Notebook Workbench Images"
        direction TB

        subgraph "Base Images"
            BaseUBI8[Base UBI8 Python 3.8<br/>oc CLI, pip, setuptools]
            BaseUBI9[Base UBI9 Python 3.9<br/>oc CLI, pip, setuptools]
            BaseC9S[Base CentOS Stream 9<br/>Python 3.9]
        end

        subgraph "Jupyter Variants - CPU"
            JupyterMin[Jupyter Minimal<br/>JupyterLab 3.6]
            JupyterDS[Jupyter Data Science<br/>pandas, numpy, scikit-learn, Elyra]
            JupyterPyTorch[Jupyter PyTorch<br/>PyTorch, torchvision]
            JupyterTF[Jupyter TensorFlow<br/>TensorFlow, Keras]
            JupyterTrustyAI[Jupyter TrustyAI<br/>Explainability libraries]
        end

        subgraph "Jupyter Variants - GPU"
            CUDABase[CUDA Base<br/>CUDA 11.8+, cuDNN, NCCL]
            CUDAJupyterMin[CUDA Jupyter Minimal]
            CUDAJupyterDS[CUDA Jupyter Data Science]
            HabanaJupyter[Habana Jupyter<br/>Intel Gaudi 1.9-1.11]
        end

        subgraph "Alternative Workbenches"
            CodeServer[code-server<br/>VS Code in browser<br/>Port 8888/TCP]
            RStudio[RStudio Server<br/>R IDE<br/>Port 8787/TCP]
        end

        subgraph "Runtime Images"
            RuntimeMin[Runtime Minimal<br/>Elyra pipeline execution]
            RuntimeDS[Runtime Data Science<br/>No Jupyter UI]
        end

        BaseUBI9 -->|adds JupyterLab| JupyterMin
        JupyterMin -->|adds ML libraries| JupyterDS
        JupyterDS -->|adds PyTorch| JupyterPyTorch
        JupyterDS -->|adds TensorFlow| JupyterTF
        JupyterDS -->|adds TrustyAI| JupyterTrustyAI

        BaseUBI9 -->|adds CUDA| CUDABase
        CUDABase -->|adds JupyterLab| CUDAJupyterMin
        CUDAJupyterMin -->|adds ML libraries| CUDAJupyterDS
        CUDAJupyterDS -->|GPU optimized| JupyterPyTorch
        CUDAJupyterDS -->|GPU optimized| JupyterTF

        BaseC9S -->|adds code-server| CodeServer
        BaseC9S -->|adds RStudio| RStudio

        JupyterMin -->|removes UI| RuntimeMin
        JupyterDS -->|removes UI| RuntimeDS
    end

    subgraph "OpenShift/Kubernetes Integration"
        ImageStreams[ImageStream Manifests<br/>Version management]
        BuildConfigs[BuildConfig<br/>RStudio build pipeline]
        StatefulSets[StatefulSet Deployments<br/>Single-user instances]
    end

    subgraph "External Dependencies"
        UBI[Red Hat UBI8/9<br/>registry.access.redhat.com]
        PyPI[PyPI<br/>pypi.org]
        Quay[Quay.io Registry<br/>Image storage]
        GitHub[GitHub<br/>Source code]
    end

    subgraph "ODH/RHOAI Platform"
        NotebookController[Notebook Controller<br/>Pod orchestration]
        Dashboard[ODH Dashboard<br/>Notebook launcher UI]
        ServiceMesh[Service Mesh<br/>mTLS & AuthZ]
    end

    %% Build process
    GitHub -->|source| BuildConfigs
    UBI -->|base images| BaseUBI8
    UBI -->|base images| BaseUBI9
    JupyterDS -.->|runtime| PyPI

    ImageStreams -->|stores| Quay
    NotebookController -->|creates| StatefulSets
    Dashboard -->|triggers| NotebookController
    ServiceMesh -.->|secures| StatefulSets

    %% Deployment
    ImageStreams -->|pulls images| StatefulSets
    StatefulSets -->|runs| JupyterDS
    StatefulSets -->|runs| JupyterPyTorch
    StatefulSets -->|runs| JupyterTF
    StatefulSets -->|runs| CodeServer
    StatefulSets -->|runs| RStudio

    style JupyterDS fill:#4a90e2,stroke:#333,stroke-width:2px
    style JupyterPyTorch fill:#4a90e2,stroke:#333,stroke-width:2px
    style JupyterTF fill:#4a90e2,stroke:#333,stroke-width:2px
    style NotebookController fill:#7ed321,stroke:#333,stroke-width:2px
    style Dashboard fill:#7ed321,stroke:#333,stroke-width:2px
    style ServiceMesh fill:#7ed321,stroke:#333,stroke-width:2px
    style UBI fill:#999,stroke:#333,stroke-width:2px
    style PyPI fill:#f5a623,stroke:#333,stroke-width:2px
    style Quay fill:#f5a623,stroke:#333,stroke-width:2px
