# ggrn/wsl-igpu-container architecture

> Architecture diagram of the GitHub repository ggrn/wsl-igpu-container, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ggrn/wsl-igpu-container
- Repository: https://github.com/ggrn/wsl-igpu-container

## Overview

##### Main Components

a. Host System Layer:
- Windows 11 (Dev Ring)
- Intel GPU Hardware
- Intel GPU Drivers (DCH)
- WSL Runtime
- Docker Engine

b. Container Layer:
- Dev Container Environment
- Mounted Driver Components
- Compute Runtime
- Development Tools

##### Component Relationships

a. Physical Layer (Bottom):
- It to the Windows GPU Drivers

b. Host System Layer (Middle):
- WSL running on Windows 11
- Docker Engine integration with WSL
- Critical mounted paths:
- /usr/lib/wsl/drivers
- /usr/lib/wsl/lib/libdxcore.so

c. Container Layer (Top):
- Dev Container environment
- Compute Runtime components
- Development tools (VS Code, clinfo)

##### Specific notations for

- Volume mounts between WSL and container
- GPU pass-through path
- VS Code Remote Container connection
- OpenCL computation flow

##### Important Details to Capture

- Development workflow from VS Code to container
- GPU driver path from hardware through WSL to container
- OpenCL computation path
- Critical mounted components

##### OpenCL capability verification (clinfo)

This will help developers understand both the static architecture and the dynamic initialization process of the development environment.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef windows fill:#add8e6,stroke:#333
    classDef wsl fill:#90EE90,stroke:#333
    classDef container fill:#FFA500,stroke:#333
    classDef intel fill:#FFD700,stroke:#333
    classDef config fill:#FFB6C1,stroke:#333

    %% Legend
    subgraph Legend
        L1[Windows Components]:::windows
        L2[WSL Components]:::wsl
        L3[Container Components]:::container
        L4[Intel Components]:::intel
        L5[Config Files]:::config
    end

    %% Physical Layer
    subgraph Physical
        GPU[Intel GPU Hardware]:::intel
        Drivers[Intel GPU Drivers DCH]:::intel
        GPU --> Drivers
    end

    %% Host System Layer
    subgraph Host
        Win11[Windows 11 Dev Ring]:::windows
        WSLRuntime[WSL Runtime]:::wsl
        DockerEngine[Docker Engine]:::windows
        WSLDrivers["/usr/lib/wsl/drivers"]:::wsl
        LibDXCore["/usr/lib/wsl/lib/libdxcore.so"]:::wsl

        Win11 --> WSLRuntime
        Win11 --> DockerEngine
        Drivers -.-> WSLDrivers
        WSLDrivers -.-> LibDXCore
    end

    %% Container Layer
    subgraph Container
        DevContainer[Dev Container Environment]:::container
        ComputeRuntime[Compute Runtime]:::container
        DevTools[Development Tools]:::container
        VSCode[VS Code Remote]:::container
        CLInfo[clinfo Verification]:::container

        DevContainer --> ComputeRuntime
        DevContainer --> DevTools
        VSCode --> DevTools
        ComputeRuntime --> CLInfo
    end

    %% Configuration Files
    subgraph Config
        ContainerConfig[DevContainer Config]:::config
        DockerFile[Dockerfile]:::config
        InstallScript[Driver Install Script]:::config
        Documentation[README]:::config
        GitConfig[Git Config]:::config
    end

    %% Relationships
    WSLRuntime --> DevContainer
    DockerEngine --> DevContainer
    LibDXCore -.-> ComputeRuntime
    WSLDrivers -.-> ComputeRuntime

    %% Click Events
    click ContainerConfig "https://github.com/ggrn/wsl-igpu-container/blob/main/.devcontainer/devcontainer.json"
    click DockerFile "https://github.com/ggrn/wsl-igpu-container/tree/main/Dockerfile"
    click InstallScript "https://github.com/ggrn/wsl-igpu-container/blob/main/fetch-debs.sh"
    click Documentation "https://github.com/ggrn/wsl-igpu-container/blob/main/README.md"
    click GitConfig "https://github.com/ggrn/wsl-igpu-container/blob/main/.gitignore"
```
