Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for interactive and URI generation #19

Open
vsoch opened this issue Aug 1, 2024 · 0 comments
Open

support for interactive and URI generation #19

vsoch opened this issue Aug 1, 2024 · 0 comments

Comments

@vsoch
Copy link
Member

vsoch commented Aug 1, 2024

Interactive mode with command line interaction

jobspec nextegen should be able to accept an interactive mode, where the subinstance is expected to run at some duration or based on the parent. We could minimally output the Flux URIs for each subinstance, or even make a setup where the jobspec run will correspond with a named config file (in some determined location) so then the user can interact with the instance. For example, I might launch a jobspec with subinstances:

# Create your nested instances with jobs, etc.
jobspec run ./examples/ml-batch.yaml

# List the instances created
jobspec list-instances job://ml-batch
group-1
group-2

# Execute commands to them (wraps a flux proxy to the URI)
jobspec exec job://ml-batch:group-1 flux run echo hello world
hello world

The reason I'm thinking of having a namespace design with job:// is because we could imagine other units to execute work to. For Kubernetes it could be either of these:

# This example shows an idea to have namespaced uris for executing commands to
jobspec exec job://ml-batch kubectl exec -it <pod> bash
jobspec exec k8s://ml-batch exec -it <pod> bash

I actually think I like the first - less things to remember. That said, if it's always a "URI thing" it is a cleaner interface to do:

# This example assumes it is always a flux URI (and removes the URI prefix)
jobspec list-instances ml-batch
jobspec exec ml-batch:group-1 flux run echo hello world
jobspec exec ml-batch kubectl exec -it <pod> bash

I might like that best of all - feels very container-y :)

This would work for instances running work (non-interactive), or for an interactive instance (started with sleep), which we can do with:

version: 1
resources:
  spack:
    count: 1
    type: node

tasks:
- name: spack-builder
  interactive: true
  resources: spack

Also see related #20

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

No branches or pull requests

1 participant