refactor(cat-bodhi): deploy pinned upstream source
This commit is contained in:
+11
-2
@@ -1,3 +1,5 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
# CAT-BODHI Sprite Segmentation API
|
||||
# Node.js + Python + PyTorch in one container
|
||||
#
|
||||
@@ -11,6 +13,8 @@ FROM python:3.11-slim
|
||||
ARG NODE_MAJOR=22
|
||||
ARG TORCH_INDEX=https://download.pytorch.org/whl/cpu
|
||||
ARG PIP_MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
ARG CAT_BODHI_REF=eaf9d27b4ebe3821da983106a78aa1c745532527
|
||||
ARG CAT_BODHI_ARCHIVE_SHA256=73257f7c9832dd06f958e43cc41d1dccff91788fe49d5384c104d24c75862d4d
|
||||
|
||||
# 中科大 Debian 镜像源
|
||||
RUN sed -i 's|http://deb.debian.org/debian|https://mirrors.ustc.edu.cn/debian|g' /etc/apt/sources.list.d/debian.sources \
|
||||
@@ -35,8 +39,13 @@ RUN pip install --no-cache-dir \
|
||||
Pillow
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mkdir -p assets/ai/cats assets/ai/beads
|
||||
RUN curl -fL --retry 5 --retry-all-errors --connect-timeout 20 \
|
||||
"https://codeload.github.com/ziyuezhou1/CAT-BODHI/tar.gz/${CAT_BODHI_REF}" \
|
||||
-o /tmp/cat-bodhi.tar.gz \
|
||||
&& echo "${CAT_BODHI_ARCHIVE_SHA256} /tmp/cat-bodhi.tar.gz" | sha256sum -c - \
|
||||
&& tar -xzf /tmp/cat-bodhi.tar.gz --strip-components=1 -C /app \
|
||||
&& rm /tmp/cat-bodhi.tar.gz \
|
||||
&& mkdir -p assets/ai/cats assets/ai/beads
|
||||
|
||||
EXPOSE 8080
|
||||
ENV PORT=8080
|
||||
|
||||
Reference in New Issue
Block a user