This commit is contained in:
tao.chen
2026-07-27 14:59:01 +08:00
commit 4f9bb9fd66
4 changed files with 1850 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# ==================== 环境变量配置 ====================
# 设置默认值(如果命令行没传,就用这里的默认路径)
WORKSPACES_ROOT ?= ./test/workspaces
PUBLIC_BASE_URL ?= http://localhost
RUNTIME_HOST ?= 0.0.0.0
RUNTIME_PORT ?= 8001
BACKEND_HOST ?= 0.0.0.0
BACKEND_PORT ?= 8000
# 将变量导出给 Makefile 启动的所有子进程
export WORKSPACES_ROOT
export PUBLIC_BASE_URL
.PHONY: runtime backend
runtime:
uv run --package runtime uvicorn runtime.main:app --host $(RUNTIME_HOST) --port $(RUNTIME_PORT)
runtime-dev:
uv run --package runtime uvicorn runtime.main:app --host $(RUNTIME_HOST) --port $(RUNTIME_PORT) --reload
backend:
uv run --package backend uvicorn backend.main:app --host $(BACKEND_HOST) --port $(BACKEND_PORT)
backend-dev:
uv run --package backend uvicorn backend.main:app --host $(BACKEND_HOST) --port $(BACKEND_PORT) --reload
+39
View File
@@ -0,0 +1,39 @@
### GET /api/v1/health
GET http://127.0.0.1:8001/api/v1/health
### POST /api/v1/jupyter start
POST http://127.0.0.1:8001/api/v1/jupyter
Content-Type: application/json
{
"action": "start",
"workspace_id": "test1234"
}
### POST /api/v1/jupyter list
POST http://127.0.0.1:8001/api/v1/jupyter
Content-Type: application/json
{
"action": "list"
}
### POST /api/v1/jupyter stop
POST http://127.0.0.1:8001/api/v1/jupyter
Content-Type: application/json
{
"action": "stop",
"workspace_id": "test1234"
}
### POST /api/v1/jupyter get
POST http://127.0.0.1:8001/api/v1/jupyter
Content-Type: application/json
{
"action": "get",
"workspace_id": "test1234"
}
+12
View File
@@ -0,0 +1,12 @@
[project]
name = "model-platform"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = []
[tool.uv.workspace]
members = [
"backend",
"runtime",
"common",
]
Generated
+1773
View File
File diff suppressed because it is too large Load Diff