init
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
[project]
|
||||
name = "model-platform"
|
||||
version = "0.1.0"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = []
|
||||
|
||||
[tool.uv.workspace]
|
||||
members = [
|
||||
"backend",
|
||||
"runtime",
|
||||
"common",
|
||||
]
|
||||
Reference in New Issue
Block a user