Volume attachments
It's now possible to see volume attachments when listing volumes. The dstack volume -v
command shows which fleets the volumes are attached to in the ATTACHED
column:
✗ dstack volume -v
NAME BACKEND REGION STATUS ATTACHED CREATED ERROR
my-gcp-volume-1 gcp europe-west4 active my-dev 1 weeks ago
(europe-west4-c)
my-aws-volume-1 aws eu-west-1 (eu-west-1a) active - 3 days ago
This can help you decide if you should use an existing volume for a run or create a new volume if all volumes are occupied.
You can also check which volumes are currently attached and which are not via the API:
import os
import requests
url = os.environ["DSTACK_URL"]
token = os.environ["DSTACK_TOKEN"]
project = os.environ["DSTACK_PROJECT"]
print("Getting volumes...")
resp = requests.post(
url=f"{url}/api/project/{project}/volumes/list",
headers={"Authorization": f"Bearer {token}"},
)
volumes = resp.json()
print("Checking volumes attachments...")
for volume in volumes:
is_attached = len(volume["attachments"]) > 0
print(f"Volume {volume['name']} attached: {is_attached}")
✗ python check_attachments.py
Getting volumes...
Checking volumes attachments...
Volume my-gcp-volume-1 attached: True
Volume my-aws-volume-1 attached: False
Bugfixes
This release contains several important bugfixes including a bugfix for fleets with placement: cluster
(#2302).
What's Changed
- Add Deepseek and Intel Examples by @Bihan in #2291
- Add volume attachments info to the API and CLI by @r4victor in #2298
- Fix and test offers and pool instances filtering by @r4victor in #2303
Full Changelog: 0.18.41...0.18.42