Skip to content

.dstack.yml (service)

A service is a web app accessible from the Internet.

The configuration file name must end with .dstack.yml (e.g., .dstack.yml or service.dstack.yml are both acceptable).


type: service


  - MODEL_ID=TheBloke/Llama-2-13B-chat-GPTQ 

port: 80

  - text-generation-launcher --hostname --port 80 --trust-remote-code

YAML reference


Property Description Type Default value
type Literal['service'] 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] []
commands The bash commands to run List[str] required
port The port, that application listens to or the mapping Union[ConstrainedIntValue,ConstrainedStrValue,PortMapping] required