update: add common
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# runtime/Dockerfile
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装 uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
|
||||
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
||||
COPY common ./common
|
||||
COPY runtime ./runtime
|
||||
|
||||
RUN uv sync --frozen --no-dev --package backend
|
||||
|
||||
EXPOSE 8001
|
||||
|
||||
CMD ["uv", "run", "--package", "runtime", "uvicorn", "runtime.main:app", "--host", "0.0.0.0", "--port", "8001"]
|
||||
@@ -19,6 +19,9 @@ dependencies = [
|
||||
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
|
||||
default = true
|
||||
|
||||
[tool.uv.sources]
|
||||
common = { workspace = true }
|
||||
|
||||
[build-system]
|
||||
requires = ["uv_build>=0.11.31,<0.12.0"]
|
||||
build-backend = "uv_build"
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
Reference in New Issue
Block a user