This commit is contained in:
SOULOFCINDER 2023-03-31 15:41:41 +08:00
parent e82b4b5782
commit 9f06fadd88
3 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,25 @@
# please visit https://github.com/xfyun/aiges/releases to get stable and suitable iamges.
FROM docker.io/library/python:3.8.9
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
WORKDIR /home/user/app
RUN useradd -m -u 1000 user
RUN chown -R 1000.1000 /home/user
RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
RUN pip install --no-cache-dir pip==22.3.1
RUN --mount=target=requirements.txt,source=requirements.txt pip install --no-cache-dir -r requirements.txt
COPY --chown=1000 ./ /home/user/app
CMD ["python3", "app.py"]

View File

@ -1,6 +1,6 @@
import gradio as gr
from transformers import MaskFormerImageProcessor, MaskFormerForInstanceSegmentation
from PIL import Image
def inference(img):
# load MaskFormer fine-tuned on COCO panoptic segmentation
model_path = "maskformer-swin-large-coco"

View File

@ -0,0 +1,2 @@
gradio==3.21.0
transformers==4.27.1