Skip to content

Fixing issues with nvidia-smi containers having the same name #1727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions services/sidecar/src/simcore_service_sidecar/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
import logging
import os
import uuid
from typing import Awaitable, List

import aiodocker
Expand All @@ -14,6 +14,7 @@
from simcore_service_sidecar import config
from simcore_service_sidecar.mpi_lock import acquire_mpi_lock


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -91,7 +92,7 @@ async def async_is_gpu_node() -> bool:
}
try:
await docker.containers.run(
config=spec_config, name=f"sidecar_{os.getpid()}_test_gpu"
config=spec_config, name=f"sidecar_{uuid.uuid4()}_test_gpu"
)
return True
except aiodocker.exceptions.DockerError as e:
Expand Down