.dstack.yml (dev-environment)¶
A dev environment is a cloud instance pre-configured with an IDE.
The configuration file name must end with .dstack.yml
(e.g., .dstack.yml
or dev.dstack.yml
are both acceptable).
Example¶
type: dev-environment
python: "3.11" # (Optional) If not specified, your local version is used
ide: vscode
YAML reference¶
DevEnvironmentConfiguration¶
Property | Description | Type | Default value |
---|---|---|---|
type |
Literal['dev-environment'] |
required | |
image |
The name of the Docker image to run | Optional[str] |
None |
entrypoint |
The Docker entrypoint | Optional[str] |
None |
home_dir |
The absolute path to the home directory inside the container | str |
/root |
registry_auth |
Credentials for pulling a private container | Optional[RegistryAuth] |
None |
python |
The major version of Python Mutually exclusive with the image |
Optional[PythonVersion] |
None |
env |
The mapping or the list of environment variables | Union[List[ConstrainedStrValue],Dict[str, str]] |
{} |
setup |
The bash commands to run on the boot | List[str] |
[] |
ports |
Port numbers/mapping to expose | List[Union[ConstrainedIntValue,ConstrainedStrValue,PortMapping]] |
[] |
ide |
The IDE to run | Literal['vscode'] |
required |
version |
The version of the IDE | Optional[str] |
None |
init |
The bash commands to run | List[str] |
[] |