Skip to content

Commit

Permalink
Pick higher ports for TensorDock, bump gpuhunt version
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor-S committed Oct 31, 2023
1 parent ab7c27a commit 28ac13f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_long_description():
"docker>=6.0.0",
"dnspython",
"grpcio>=1.50", # indirect
"gpuhunt==0.0.1rc2",
"gpuhunt==0.0.1rc3",
]

AWS_DEPS = [
Expand Down
1 change: 1 addition & 0 deletions src/dstack/_internal/core/backends/base/offers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def get_catalog_offers(
filters.update(
min_cpu=requirements.cpus,
max_price=requirements.max_price,
min_disk_size=100, # TODO(egor-s): take from requirements
spot=requirements.spot,
)
if requirements.memory_mib is not None:
Expand Down
3 changes: 2 additions & 1 deletion src/dstack/_internal/core/backends/tensordock/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def deploy_single(self, instance_name: str, instance: InstanceType, cloudinit: d
"gpu_model": gpu_model,
"vcpus": instance.resources.cpus,
"ram": instance.resources.memory_mib // 1024,
"external_ports": "{%s}" % hostnode["networking"]["ports"][0],
"external_ports": "{%s}"
% max(hostnode["networking"]["ports"]), # it's safer to use a higher port
"internal_ports": "{22}",
"hostnode": instance.name,
"storage": 100, # TODO(egor-s): take from instance.resources
Expand Down
8 changes: 8 additions & 0 deletions src/dstack/api/_public/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ def load(
f"The repo is not initialized. Run `dstack init` to initialize the repo."
)
repo = load_repo(repo_config)
try:
self._api_client.repos.get(self._project, repo.repo_id, include_creds=False)
except requests.HTTPError as e:
if "404" in e.args[0]:
raise ConfigurationError(
f"The repo is not initialized. Run `dstack init` to initialize the repo."
)
raise
else:
logger.debug("Initializing repo")
repo = LocalRepo(repo_dir=repo_dir) # default
Expand Down

0 comments on commit 28ac13f

Please sign in to comment.