26 lines
636 B
Docker
26 lines
636 B
Docker
FROM python:3.10-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
# OpenCV 运行时依赖
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libglib2.0-0 \
|
|
libgl1 \
|
|
libgomp1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install --no-cache-dir -r /app/requirements.txt
|
|
|
|
COPY app /app/app
|
|
COPY assets/fonts /app/assets/fonts
|
|
COPY run_batch.sh /app/run_batch.sh
|
|
RUN mkdir -p /app/models /app/input /app/runs \
|
|
&& chmod +x /app/run_batch.sh
|
|
|
|
ENTRYPOINT ["bash", "/app/run_batch.sh"]
|
|
CMD ["--input", "/app/input", "--output", "/app/runs"]
|