From 99c4fad5aa80e2aa3efbce0a6d85cb2204e066cf Mon Sep 17 00:00:00 2001 From: zcr Date: Thu, 5 Feb 2026 10:03:30 +0800 Subject: [PATCH] first commit --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6e2f6dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.12-slim + +# Install uv. +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +# Copy the application into the container. +COPY . /app + +# Install the application dependencies. +WORKDIR /app + +# 更新索引并安装替代包 +RUN apt-get update && apt-get install -y \ + vim \ + libgl1 \ + libglib2.0-0 \ + +RUN uv sync --frozen --no-cache + +# Run the application. +CMD ["/app/.venv/bin/fastapi", "run", "app/main.py", "--port", "80", "--host", "0.0.0.0"] \ No newline at end of file