dstack icon indicating copy to clipboard operation
dstack copied to clipboard

Support running run configurations with `dstack apply`

Open r4victor opened this issue 1 year ago • 1 comments

#1223 allowed creating/updating gateways via dstack apply. Similarly, dstack apply should work for runs. It will accept a run configuration as

dstack apply -f service.dstack.yml

If the run configuration doesn't specify a run name, dstack apply will work just like dstack run – create a new run with a random name. If the run name is specified, then dstack apply will create/re-create the run with the specified name. dstack apply can have configuration-specific arguments and accept the same arguments as dstack run.

Required changes:

  • Add name field to run configuration so that users can specify run names in yaml.
  • dstack run requires working_dir positional argument that serves two purposes: 1) it's used as the working dir of the container and 2) run configuration is searched relative two it. dstack apply doesn't have required working_dir. The working_dir of the container should be specified via a new run configuration parameter. The run configuration search doesn't need to be done with respect to some specific working_dir – only with respect to cwd – so this can be dropped.

r4victor avatar Jun 12 '24 08:06 r4victor

Currently, resource specification via dstack run CLI arguments is very limited. cpu and memory are not supported. This can be fixed if the CLI arguments unified with dstack pool add. This could probably be done together with #1327

r4victor avatar Jun 12 '24 09:06 r4victor

This issue is stale because it has been open for 30 days with no activity.

peterschmidt85 avatar Jul 13 '24 01:07 peterschmidt85