Skip to content

Feature/singularity#111

Merged
rssk merged 9 commits intomainfrom
feature/singularity
Jan 22, 2026
Merged

Feature/singularity#111
rssk merged 9 commits intomainfrom
feature/singularity

Conversation

@rssk
Copy link
Copy Markdown
Collaborator

@rssk rssk commented Dec 16, 2025

PR Summary: Singularity Container Service Support

Overview

Adds Singularity/Apptainer container service support to the edge client, enabling runs on systems without Docker. The central client remains Docker-only.

Changes

Edge Client (edgeFederatedClient)

  • src/runCoordinator/nodeManager/launchNode.ts
    • Added launchSingularityNode() and attachSingularityEventHandlers()
    • Detects singularity or apptainer binary
    • Finds .sif image files in configured directories
    • Handles bind mounts, environment variables, and process management
    • Propagates container exit codes to callbacks

Central Client (centralFederatedClient)

  • src/runCoordinator/nodeManager/launchNode.ts
    • Enforced Docker-only; throws error if non-Docker service requested

Configuration

  • Added containerService?: string to edge client config (defaults to 'docker')
  • Updated all Electron app config files with containerService: "docker"

Image Management

  • desktopApp/electronApp/src/singularityImageManager.ts (new)
    • Pulls and converts Docker images to Singularity format
    • Uses network API to get Docker image digests (no Docker required)
    • Hash-based naming: {image_name}-{hash}.sif
    • Stores images in {pathBaseDirectory}/singularityImages/
    • Auto-cleans old image versions

UI Updates

  • Consortium Page: Hides Docker command section when using Singularity
  • Terminal Window: Shows "Run Singularity Pull" button, streams pull output in real-time
  • Added IPC handlers and React API methods for Singularity operations

Error Handling

  • Fixed container exit error reporting to match Docker pattern
  • Updated error callbacks to include actual error messages
  • Properly captures stdout/stderr for error reporting

Technical Details

  • Images stored in: {pathBaseDirectory}/singularityImages/
  • Uses Docker Registry API v2 for digest retrieval (works without Docker)
  • Container execution: singularity run --containall --writable-tmpfs -e
  • Host networking (default for Singularity)

Breaking Changes

None. All changes are backward compatible. Docker remains the default.

pixelsaurus
pixelsaurus previously approved these changes Jan 15, 2026
Copy link
Copy Markdown
Contributor

@pixelsaurus pixelsaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! Looks great!

@rssk rssk merged commit d8bca04 into main Jan 22, 2026
1 check passed
@rssk rssk deleted the feature/singularity branch January 22, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants