init
: Creating and writing a workflow file.
Using as a CLI
-
You can initialize a basic YAML workflow by running:
dps init
job.<random>.yaml# yaml-language-server: $schema=/tmp/.job.schema.json
## See: https://docs.deepsquare.run/workflow/workflow-api-reference/job
## Allow DeepSquare logging
enableLogging: true
## Allocate resources
resources:
tasks: 1
cpusPerTask: 1
memPerCpu: 200
gpus: 0
## The job content
steps:
## The steps of the jobs which are run sequentially.
- name: 'hello-world'
run:
container:
image: ubuntu:latest
command: echo "hello world" -
You can edit it with your favorite YAML IDE that supports the yaml-language-server by RedHat. Or, you can use the online editor of the Nexus.
-
The YAML language server should detect the JSON schema and show the documentation for each field:
(Example with VSCode)
If you need help in writing a workflow file, you can consult the Getting Started or consult the workflow reference API.
To submit a job, follow the steps indicated in the next page.
Using as a TUI
-
Start the TUI by running
dps
: -
Press s to create a workflow file and open the workflow editor. Based on your environment variables, it will open your default visual text editor. On Linux, it is possible to change the visual text editor by changing the
VISUAL
environment variable. On Windows, the TUI will try to opennano.exe
,vim.exe
,notepad++.exe
ornotepad.exe
. If none of these editors suits your needs, you can quit the editor and open the workflow file that has been created in the working directory with your favorite text editor. -
If your text editor supports the yaml-language-server by RedHat, the YAML language server should detect the JSON schema and show the documentation for each field:
(Example with Helix)
If you need help in writing a workflow file, you can consult the Getting Started or consult the workflow reference API.
To submit a job, follow the steps indicated in the next page.