{"id":50869789,"url":"https://github.com/dstackai/dstack-templates","last_synced_at":"2026-06-15T04:02:47.969Z","repository":{"id":337980602,"uuid":"1154643240","full_name":"dstackai/dstack-templates","owner":"dstackai","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-27T15:18:02.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T14:54:50.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dstackai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T16:11:02.000Z","updated_at":"2026-04-24T01:53:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dstackai/dstack-templates","commit_stats":null,"previous_names":["peterschmidt85/dstack-templates"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dstackai/dstack-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstackai%2Fdstack-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstackai%2Fdstack-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstackai%2Fdstack-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstackai%2Fdstack-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dstackai","download_url":"https://codeload.github.com/dstackai/dstack-templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstackai%2Fdstack-templates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34346870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-15T04:02:47.177Z","updated_at":"2026-06-15T04:02:47.963Z","avatar_url":"https://github.com/dstackai.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Templates\n\nTemplates let users create `dstack` runs from the UI via a launch wizard — select a template,\npick GPU resources, adjust settings, and review the final configuration.\n\nWhile `dstack` is typically used via the CLI, templates make it easy to launch runs\ndirectly from the UI through a guided experience.\n\n## Using templates\n\n\u003e [!NOTE]\n\u003e Templates require `dstack` server version 0.20.12 or newer.\n\nTo enable the launch wizard, point the server to a Git repository containing templates\nvia the `DSTACK_SERVER_TEMPLATES_REPO` environment variable:\n\n```shell\n$ DSTACK_SERVER_TEMPLATES_REPO=https://github.com/dstackai/dstack-templates dstack server\n```\n\nOnce configured, the **Launch** button on the **Runs** page will show the available templates.\nSelect a template, configure the parameters, and click **Apply** to create the run.\n\n\u003cimg width=\"850\" src=\"https://dstack.ai/static-assets/static-assets/images/dstack-templates-in-browser-ide-o.gif\" /\u003e\n\n\u003e [!NOTE]\n\u003e The launch wizard is an experimental feature. Currently, templates are configured per server.\n\u003e Per-project templates configuration is coming soon.\n\n## Creating custom templates\n\nTo define your own templates, fork this repository or create a new one following the same layout.\n\nTemplates are YAML files placed under the `.dstack/templates/` directory in the repository.\nEach file defines a single template.\n\n## Template format\n\nEach template file has the following top-level fields:\n\n- `type` — always `template`\n- `name` — unique identifier within the repository\n- `title` — human-readable label shown in the UI\n- `description` — short description shown in the UI\n- `parameters` — list of configurable [parameters](#parameters)\n- `configuration` — a standard `dstack` run configuration ([`dev-environment`](https://dstack.ai/docs/concepts/dev-environments), [`service`](https://dstack.ai/docs/concepts/services), or [`task`](https://dstack.ai/docs/concepts/tasks))\n\n\n### Exmaples\n\n#### Desktop IDE\n\nA simple template that launches a dev environment accessible from a desktop IDE:\n\n```yaml\ntype: template\nname: desktop-ide\n\ntitle: Desktop IDE\ndescription: Access the instance from your desktop VS Code, Cursor, or Windsurf.\n\nparameters:\n  - type: name\n  - type: ide\n  - type: resources\n  - type: python_or_docker\n  - type: repo\n  - type: working_dir\n\nconfiguration:\n  type: dev-environment\n```\n\n#### In-browser IDE\n\nA template that deploys in-browser VS Code as a service:\n\n```yaml\ntype: template\nname: in-browser-ide\n\ntitle: In-browser IDE\ndescription: Access the instance using VS Code in the browser.\n\nparameters:\n  - type: name\n  - type: resources\n  - type: python_or_docker\n  - type: repo\n  - type: working_dir\n\n  - type: env\n    title: Password\n    name: PASSWORD\n    value: $random-password\n\nconfiguration:\n  type: service\n\n  env:\n    - BIND_ADDR=0.0.0.0:8080\n  commands:\n    - |\n      echo \"Your password is $PASSWORD. Share it carefully as it grants full access to the IDE.\"\n    - |\n      curl -fsSL https://code-server.dev/install.sh | sh -s -- --method standalone --prefix /tmp/code-server\n    - |\n      /tmp/code-server/bin/code-server --bind-addr $BIND_ADDR --auth password --disable-telemetry --disable-update-check .\n  port: 8080\n\n  probes:\n    - type: http\n      url: /healthz\n\n  gateway: true\n  https: auto\n  auth: false\n```\n\nThe `env` parameter with `value: $random-password` tells the UI to auto-generate a random\npassword and pass it to the run configuration.\n\n## Parameters\n\nParameters are special constructs supported by the `dstack` UI. Each parameter type maps to\na dedicated UI widget that provides context-aware configuration (e.g. showing available GPU offers,\nlisting Git repos, etc.).\n\n| Type               | Description                                                                                                     |\n|--------------------|-----------------------------------------------------------------------------------------------------------------|\n| `name`             | Configure an optional run name.                                                                                 |\n| `ide`              | Pick a desktop IDE (VS Code, Cursor, Windsurf).                                                                 |\n| `resources`        | Configure GPU/CPU resources based on available offers in the project.                                            |\n| `python_or_docker` | Select a Python version (to use the `dstack` base image) or specify a Docker image.                              |\n| `repo`             | Configure a Git repo to clone into the run.                                                                      |\n| `working_dir`      | Configure a working directory.                                                                                   |\n| `env`              | Define a custom environment variable. Supports `title`, `name`, and `value` properties. The special value `$random-password` tells the UI to auto-generate a random password. |\n\n## TODO\n\n- Per-project templates configuration (currently templates are configured per server)\n\n## What's next?\n\n1. Check the [dstack docs](https://dstack.ai/docs)\n2. Learn about [dev environments](https://dstack.ai/docs/concepts/dev-environments), [tasks](https://dstack.ai/docs/concepts/tasks), and [services](https://dstack.ai/docs/concepts/services)\n3. Browse [examples](https://dstack.ai/docs/examples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstackai%2Fdstack-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdstackai%2Fdstack-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstackai%2Fdstack-templates/lists"}