Skip to content

A 2-cpu instance gets launched with cpu: 1 setting #142

Closed
@r4victor

Description

@r4victor

Specify cpu: 1 in a workflow, like so:

- name: python-version
    provider: bash
    python: 3.7
    commands:
      - python --version
    resources:
      cpu: 1

And run it remotely. dstack will launch an instance with 2 cpus despite the setting. If you have a limit on a number of cpus in your AWS account, then you'll get VcpuLimitExceeded error. This may prevent trying dstack on free-tier AWS accounts with cpu limit set to 1.

The problem arises because dstack runs instances with at least 2 cpus and treats resources as minimum requirements.

Expected behavior:

  1. Support cpu: 1; or
  2. Clarify that resources specify minimum requirements, not exact ones, and the resources allocated may exceed the specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions