Skip to content

Commit

Permalink
fix(client): model run with --runtime error when model has packaged rt (
Browse files Browse the repository at this point in the history
  • Loading branch information
goldenxinxing authored May 16, 2023
1 parent fc15f78 commit da5a69d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/starwhale/core/model/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import os
import typing as t
from pathlib import Path

Expand All @@ -19,6 +20,7 @@
from starwhale.core.model.model import ModelConfig, ModelInfoFilter
from starwhale.core.model.store import ModelStorage
from starwhale.base.uri.resource import Resource, ResourceType
from starwhale.core.runtime.process import Process


@click.group(
Expand Down Expand Up @@ -670,7 +672,8 @@ def _prepare_model_run_args(
raise NoSupportError("module is not supported in model uri mode")

if (
model_store.digest.get("packaged_runtime")
os.environ.get(Process.EnvInActivatedProcess, "0") == "0"
and model_store.digest.get("packaged_runtime")
and not forbid_packaged_runtime
and runtime_uri is None
):
Expand Down

0 comments on commit da5a69d

Please sign in to comment.