dstack
dstack copied to clipboard
[UX] Detect `pulling` job status for container-based backends
In container-based backends, we have to implement backend-specific logic to detect if the pod is assigned to an instance which means its successfully provisioned:
- In
runpodandvastaiwe can assume that if the pod is created, it's already assigned to a node. Inrunpod, there ismachineIdproperty in the pod and it's always filled if the pod is created, otherwise it's not created. Invastaithe pod is bound to a particular instanceId which also means it's assigned from the very beginning. - In
kubernetes, we could check if the pod is assigned to a node using the standard Kubernetes API.