Enable dedicated MMSeg full mmcv runtime
This commit is contained in:
@@ -17,8 +17,14 @@ _running: dict[str, subprocess.Popen] = {}
|
||||
_lock = threading.Lock()
|
||||
|
||||
|
||||
def default_conda_env_for_job(job_type: str) -> str:
|
||||
if job_type.startswith("mmseg."):
|
||||
return settings.mmseg_conda_env
|
||||
return settings.task_conda_env
|
||||
|
||||
|
||||
def _build_task(request: JobCreate) -> CommandSpec:
|
||||
conda_env = request.conda_env or settings.task_conda_env
|
||||
conda_env = request.conda_env or default_conda_env_for_job(request.type)
|
||||
spec = build_module_task(request.type, request.params, conda_env)
|
||||
if spec is None:
|
||||
raise ValueError(f"unsupported job type: {request.type}")
|
||||
@@ -113,4 +119,3 @@ def cancel_job(job_id: str) -> dict | None:
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
return db.get_job(job_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user