Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmechtel committed Dec 19, 2024
1 parent 7d11bb6 commit 635f848
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bioimageio_colab/register_sam_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parse_requirements(file_path) -> list:
with open(file_path, "r") as file:
lines = file.readlines()
# Filter and clean package names (skip comments and empty lines)
skip_lines = ("#", "-r ", "ray")
skip_lines = ("#", "-r ")
packages = [
line.strip()
for line in lines
Expand Down Expand Up @@ -160,8 +160,11 @@ async def register_service(args: dict) -> None:
"""
logger.info("Registering the SAM annotation service...")
logger.info(f"Available CPU cores: {os.cpu_count()}")
logger.info(f"Available GPUs: {torch.cuda.device_count()}")
logger.info(f"Available GPU devices: {torch.cuda.get_device_name()}")
if torch.cuda.is_available():
logger.info(f"Available GPUs: {torch.cuda.device_count()}")
logger.info(f"Available GPU devices: {torch.cuda.get_device_name()}")
else:
logger.info("No GPU devices available.")

workspace_token = args.token or os.environ.get("WORKSPACE_TOKEN")
if not workspace_token:
Expand Down

0 comments on commit 635f848

Please sign in to comment.