Skip to main content

Singularity/Apptainer Runner for Styx compiled wrappers

Build codecov Ruff stability-stable MIT License pages

styxsingularity is a Python package that provides Singularity/Apptainer integration for Styx compiled wrappers. It allows you to run Styx functions within Singularity containers, offering improved isolation and reproducibility for your workflows.

Installation

You can install styxsingularity using pip:

pip install styxsingularity

Usage

from styxdefs import set_global_runner
from styxsingularity import SingularityRunner

# Initialize the SingularityRunner
runner = SingularityRunner()

# Set the global runner for Styx
set_global_runner(runner)

# Now you can use any Styx functions as usual, and they will run in Singularity containers

Advanced Configuration

The SingularityRunner class accepts several parameters for advanced configuration:

  • image_overrides: A dictionary to override container image tags
  • singularity_executable: Path to the Singularity executable (default: "singularity")
  • data_dir: Directory for temporary data storage
  • environ: Environment variables to set in the container

Example:

runner = SingularityRunner(
    image_overrides={"python:3.9": "my-custom-python:3.9"},
    singularity_executable="/usr/local/bin/singularity",
    data_dir="/tmp/styx_data",
    environ={"PYTHONPATH": "/app/lib"}
)

Error Handling

styxsingularity provides a custom error class, StyxSingularityError, which is raised when a Singularity execution fails. This error includes details about the return code, command arguments, and Singularity arguments for easier debugging.

Contributing

Contributions to styxsingularity are welcome! Please refer to the GitHub repository for information on how to contribute, report issues, or submit pull requests.

License

styxsingularity is released under the MIT License. See the LICENSE file for details.

Documentation

For detailed API documentation, please visit our API Docs.

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.

Requirements

  • Python 3.10+
  • Singularity or Apptainer installed and running on your system

Comparison with styxdocker

While styxdocker and styxsingularity serve similar purposes, they have some key differences:

  • Container Technology: styxdocker uses Docker, while styxsingularity uses Singularity/Apptainer.
  • Platform Support: styxdocker works on Windows, Linux, and macOS, whereas styxsingularity is not supported on Windows.
  • User Permissions: styxdocker can run containers as the current user on POSIX systems, which can help with file permission issues.

Choose the package that best fits your infrastructure and requirements.

Metadata

Release files for styxsingularity 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for styxsingularity 0.9.0
File Size Uploaded Provenance
styxsingularity-0.9.0.tar.gz 3.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for styxsingularity 0.9.0
File Interpreter ABI Platform
styxsingularity-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / styxsingularity-0.9.0.tar.gz

Download URL styxsingularity-0.9.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
44783da3f9409f8b463dda23f8d1c7e7c11d7389db9c5be8894ceebb3535eae1
BLAKE2b-256 checksum
How to use checksums
a73db1127212c55ca362124e65ab1f2307df3698e30865eb47e335f103f72cf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / styxsingularity-0.9.0-py3-none-any.whl

Download URL styxsingularity-0.9.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07104ddc2d7ce7d7102afc3fbb9cecff2126e746d9124ffc20c99dd192547d4d
BLAKE2b-256 checksum
How to use checksums
cd6a538a0febc6bf3ba05d7f5277192f92d3977b01dd52ffe93ed3fafb7d6593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for styxsingularity 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page