Files
FiDA_Python/Dockerfile

29 lines
641 B
Docker
Raw Normal View History

2026-02-05 10:03:30 +08:00
FROM python:3.12-slim
# Install uv.
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
2026-02-05 10:26:16 +08:00
WORKDIR /env_build
2026-02-05 10:03:30 +08:00
# Copy the application into the container.
2026-02-05 10:26:16 +08:00
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-cache
ENV PATH="/env_build/.venv/bin:$PATH"
2026-02-05 10:03:30 +08:00
# Install the application dependencies.
WORKDIR /app
# 更新索引并安装替代包
2026-02-05 10:04:29 +08:00
RUN apt-get update && apt-get install -y vim
2026-02-05 10:03:30 +08:00
2026-02-05 10:26:16 +08:00
#CMD ["tail","-f","/dev/null"]
2026-02-05 10:03:30 +08:00
# Run the application.
2026-02-05 10:26:16 +08:00
CMD ["gunicorn", "main:app_server", \
"-w", "4", \
"-k", "uvicorn.workers.UvicornWorker", \
"--bind", "0.0.0.0:80", \
"--access-logfile", "-", \
"--error-logfile", "-"]