From d3ed76d0c12709aa62ab37da3707ba1764c2c272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Wed, 29 Oct 2025 22:37:29 +0800 Subject: [PATCH] add requirements --- Dockerfile | 18 ++++++------------ poetry.lock | 6 +++--- public/index.html | 4 ++-- public/report-list.js | 2 +- requirements.txt | 17 +++++++++++++++++ 5 files changed, 29 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a074bb..f318262 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,21 +14,15 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debia apt-get install -y gcc sqlite3 && \ rm -rf /var/lib/apt/lists/* -# 安装Poetry +# 复制requirements文件并安装Python依赖 +COPY requirements.txt . + +# 配置pip使用阿里云镜像源 RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \ pip config set global.trusted-host mirrors.aliyun.com && \ - pip install --no-cache-dir poetry + pip install --no-cache-dir -r requirements.txt # 复制项目文件 -COPY pyproject.toml poetry.lock* ./ - -# 配置Poetry使用阿里云镜像源并安装依赖 -RUN poetry config pypi-token.pypi-token "" && \ - poetry config repositories.aliyun https://mirrors.aliyun.com/pypi/simple/ && \ - poetry source add --priority=secondary aliyun https://mirrors.aliyun.com/pypi/simple/ && \ - poetry install --no-dev --no-interaction --no-ansi - -# 复制剩余的项目文件 COPY . . # 暴露端口 @@ -39,4 +33,4 @@ ENV PYTHONPATH=/app ENV PYTHONUNBUFFERED=1 # 启动命令 -CMD ["poetry", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/poetry.lock b/poetry.lock index 56173f2..baefcc3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -221,14 +221,14 @@ files = [ [[package]] name = "fastapi" -version = "0.120.1" +version = "0.120.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "fastapi-0.120.1-py3-none-any.whl", hash = "sha256:0e8a2c328e96c117272d8c794d3a97d205f753cc2e69dd7ee387b7488a75601f"}, - {file = "fastapi-0.120.1.tar.gz", hash = "sha256:b5c6217e9ddca6dfcf54c97986180d4a1955e10c693d74943fc5327700178bff"}, + {file = "fastapi-0.120.2-py3-none-any.whl", hash = "sha256:bedcf2c14240e43d56cb9a339b32bcf15104fe6b5897c0222603cb7ec416c8eb"}, + {file = "fastapi-0.120.2.tar.gz", hash = "sha256:4c5ab43e2a90335bbd8326d1b659eac0f3dbcc015e2af573c4f5de406232c4ac"}, ] [package.dependencies] diff --git a/public/index.html b/public/index.html index 1639109..395fbed 100644 --- a/public/index.html +++ b/public/index.html @@ -578,7 +578,7 @@ ${report.grade} ${report.school} - 查看报告 + 查看报告 `; @@ -686,4 +686,4 @@ - \ No newline at end of file + diff --git a/public/report-list.js b/public/report-list.js index d44348e..a13872c 100644 --- a/public/report-list.js +++ b/public/report-list.js @@ -96,7 +96,7 @@ class ReportListManager { ${report.grade} ${report.school} - 查看报告 + 查看报告 `; diff --git a/requirements.txt b/requirements.txt index 5f3ad08..69209d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,24 @@ +annotated-doc==0.0.3 +annotated-types==0.7.0 +anyio==4.11.0 certifi==2025.10.5 charset-normalizer==3.4.4 +click==8.3.0 et_xmlfile==2.0.0 +fastapi==0.120.2 +h11==0.16.0 +huey==2.5.1 idna==3.11 +Jinja2==3.1.6 +MarkupSafe==3.0.3 openpyxl==3.1.5 +pydantic==2.12.3 +pydantic_core==2.41.4 +python-multipart==0.0.20 requests==2.32.5 +sniffio==1.3.1 +starlette==0.49.1 +typing-inspection==0.4.2 +typing_extensions==4.15.0 urllib3==2.5.0 +uvicorn==0.38.0