Skip to content

Commit 636efa0

Browse files
committed
fix: studio app
1 parent 3f32ec2 commit 636efa0

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
File renamed without changes.

veadk/cloud/cloud_agent_engine.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ def _prepare(self, path: str, name: str):
7171

7272
shutil.copy(template_app_py, os.path.join(path, "app.py"))
7373

74+
if os.path.exists(os.path.join(path, "studio_app.py")):
75+
logger.warning(
76+
f"Local agent project path `{path}` contains an `studio_app.py` file. Use your own `studio_app.py` file may cause unexpected behavior."
77+
)
78+
else:
79+
logger.info(
80+
f"No `studio_app.py` detected in local agent project path `{path}`. Prepare it."
81+
)
82+
template_studio_app_py = (
83+
f"{Path(__file__).resolve().parent.resolve()}/template/studio_app.py"
84+
)
85+
import shutil
86+
87+
shutil.copy(template_studio_app_py, os.path.join(path, "studio_app.py"))
88+
7489
if os.path.exists(os.path.join(path, "run.sh")):
7590
logger.warning(
7691
f"Local agent project path `{path}` contains a `run.sh` file. Use your own `run.sh` file may cause unexpected behavior."

0 commit comments

Comments
 (0)