Skip to content

SBGrid Developer Best Practices

SBGrid is commonly deployed on shared multi-user systems. The SBGrid installation directory is not writeable by standard users. We support a variety of operating systems and hardware. Follow our guidelines below to facilitate inclusion of your software in SBGrid.

  1. User-Space Configuration: Direct all configuration, logs, and cache files to user-writable locations (e.g., $HOME or $XDG_CONFIG_HOME). Avoid writing to installation directories and allow users to specify custom data/model paths.
  2. Flexible Dependency Resolution: Avoid hardcoding absolute paths or RPATHs. Use specific versioning for requirements to ensure stability across different cluster environments.
  3. Scheduler Integration: Respect resource limits (CPU/GPU) defined by workload managers like Slurm. Query environment variables rather than hardcoding resource counts to ensure cooperative execution.
  4. Network Constraints: Avoid deploying outward-facing webservers or persistent background daemons. Compute nodes are shared resources and typically operate behind restrictive firewalls.
  5. I/O Optimization: Design for parallel file systems by minimizing small-file metadata operations and prioritizing batched I/O to maintain system-wide performance.
  6. Relocatable Installations: Ensure the software is prefix-independent. Use relative paths for internal assets so the installation remains functional if moved to a different directory by administrators.