How bnlnpps/esi-shell works
Project Type and Purpose
• This is a CLI‐based, container‐centric developer tool (“esi‐shell”) that automates the creation and execution of a reproducible, GPU-accelerated Geant4/OptiX simulation environment. It is not a multi-tier web application but a DevOps utility combining:
• A bash/python wrapper script (esi-shell)
• A Dockerfile that builds a container image with Spack, Geant4, plog, etc.
• Integration with the NVIDIA Container Toolkit for GPU access
• GitHub Actions CI/CD that builds and publishes images to GitHub Container Registry
Main Components
a. Developer Workstation (Host)
• esi-shell CLI script
• Docker Engine + NVIDIA Container Toolkit
• Local GPU drivers + optional host‐installed OptiX ($OPTIX_DIR)
b. Docker Container
• Base OS image (from Dockerfile)
• Spack package manager & spack/var/spack/... repo for building Geant4, plog, etc.
• Geant4 simulation framework
• NVIDIA OptiX SDK (mounted or baked in)
• Simulation code/tests (eic-opticks/tests/...)
c. CI/CD Pipeline & Registry
• .github/workflows/*.yml for pull-request builds and release builds
• ghcr.io/bnlnpps/esi-shell container registry for published images
Component Interactions & Data Flows
• User runs ./esi-shell [options] → the script invokes docker CLI → communicates with Docker daemon → builds or runs the container.
• If mounting OptiX: host $OPTIX_DIR → volume mount → container’s /usr/local/optix.
• Once container is running, user can execute simulation commands (e.g. test_opticks.sh).
• On each git push or tagged release, GitHub Actions triggers:
• Build image via Dockerfile (using spack + OptiX install script)
• Push image to ghcr.io/bnlnpps/esi-shell:<tag>
Architectural Patterns & Design Principles
• CLI Facade Pattern: single script hides Docker complexity
• Container‐as‐Contract: Docker image encapsulates all dependencies (Spack, Geant4, plog)
• Volume‐mount strategy for host‐side SDKs (OptiX)
• CI/CD pipeline for immutable, versioned container artifacts