2026-03-13 18:55:33 +08:00
|
|
|
FROM python:3.12-slim
|
|
|
|
|
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
|
PYTHONUNBUFFERED=1 \
|
2026-03-24 16:48:25 +08:00
|
|
|
UV_SYSTEM_PYTHON=1 \
|
|
|
|
|
UV_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple" \
|
2026-03-13 18:55:33 +08:00
|
|
|
TZ=Asia/Shanghai
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
COPY requirements-docker.txt /app/requirements-docker.txt
|
|
|
|
|
|
2026-03-24 16:48:25 +08:00
|
|
|
RUN echo "# 清华大学 Debian 镜像源配置\n\
|
|
|
|
|
# 主软件源\n\
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n\
|
|
|
|
|
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n\
|
|
|
|
|
\n\
|
|
|
|
|
# 安全更新源\n\
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware\n\
|
|
|
|
|
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware\n\
|
|
|
|
|
\n\
|
|
|
|
|
# 更新源\n\
|
|
|
|
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware\n\
|
|
|
|
|
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" > /etc/apt/sources.list
|
|
|
|
|
|
2026-03-13 18:55:33 +08:00
|
|
|
RUN pip install --no-cache-dir --upgrade pip \
|
|
|
|
|
&& pip install --no-cache-dir -r /app/requirements-docker.txt
|
|
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
|
|
RUN chmod +x /app/docker-entrypoint.sh
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
|
|
|
|
CMD ["python", "prefect_gmv_scheduler.py", "--serve"]
|