Skip to content

switch envs, resources are shared on multiple envs and are exclusive#1303

Draft
dnsi0 wants to merge 6 commits intomainfrom
feat/adapt-node-envs
Draft

switch envs, resources are shared on multiple envs and are exclusive#1303
dnsi0 wants to merge 6 commits intomainfrom
feat/adapt-node-envs

Conversation

@dnsi0
Copy link
Copy Markdown
Contributor

@dnsi0 dnsi0 commented Mar 27, 2026

Fixes #1280 .

Changes proposed in this PR:

  • Introduces a C2DEnvironmentConfig type and separates environment-specific configuration (fees, access, resource limits, job durations) from the Docker engine-level configuration (socket, resources, image settings)
  • Each Docker engine now supports multiple named environments via an environments: [] array, each with its own fees, access control, and resource constraints
  • Engine-level resources (CPU, RAM, GPU, disk) are shared across all environments; an environment can optionally
    reference a subset of engine resources by ID
  • Adds C2DEnvironmentConfigSchema with validation: each environment must define either a fees or free configuration, and storageExpiry must be ≥ maxJobDuration
  • Fee processing and resource building are extracted into dedicated private methods (processFeesForEnvironment,
    buildEnvResources), replacing the previous monolithic single-environment startup logic

@dnsi0 dnsi0 self-assigned this Mar 27, 2026
resources?: ComputeResource[] // optional, owner can overwrite
free?: ComputeEnvironmentFreeOptions
access: ComputeAccessList
resources?: ComputeResource[]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we plan to have global resources? then how do you limit them in an env?

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.

Do not share compute resources between environments

2 participants