Files
AiDA_Python/Dockerfile

23 lines
535 B
Docker
Raw Normal View History

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 mkdir /seg_cache
# 更新索引并安装替代包
RUN apt-get update && apt-get install -y \
vim \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN uv sync --frozen --no-cache
# Run the application.
2026-06-15 15:15:03 +08:00
CMD ["/app/.venv/bin/uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--workers", "4"]