diff --git a/table_transformer_detection/Dockerfile b/table_transformer_detection/Dockerfile index a853b01..64ccc3b 100644 --- a/table_transformer_detection/Dockerfile +++ b/table_transformer_detection/Dockerfile @@ -2,6 +2,11 @@ FROM public.ecr.aws/iflytek-open/cuda-go-python-base:11.6-1.17-3.9.13-ubuntu1804 +RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list +RUN sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list + +RUN --mount=target=/root/packages.txt,source=packages.txt apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* + WORKDIR /home/user/app RUN useradd -m -u 1000 user RUN chown -R 1000.1000 /home/user @@ -13,8 +18,11 @@ 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 +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt-get install git-lfs +RUN git lfs install +RUN git clone http://172.16.59.16:3000/microsoft/table-transformer-detection.git CMD ["python3", "app.py"] \ No newline at end of file diff --git a/table_transformer_detection/app.py b/table_transformer_detection/app.py index 8157f30..6305f0f 100644 --- a/table_transformer_detection/app.py +++ b/table_transformer_detection/app.py @@ -37,7 +37,7 @@ with gr.Blocks() as demo: gr.Markdown( """ # object detection:table-transformer-detection - Gradio Demo for table-transformer-detection. To use it, simply upload your image, or click one of the examples to load them. + 这是table-transformer-detection的Gradio Demo,用于目标检测。上传你想要的图像或者点击下面的示例来加载它. """) with gr.Row(): image_input = gr.Image(type="pil") @@ -46,4 +46,4 @@ with gr.Blocks() as demo: image_button.click(inference, inputs=image_input, outputs=image_output) gr.Examples(examples,inputs=image_input) -demo.launch() \ No newline at end of file +demo.launch(server_name="0.0.0.0") \ No newline at end of file diff --git a/table_transformer_detection/packages.txt b/table_transformer_detection/packages.txt new file mode 100644 index 0000000..b399c93 --- /dev/null +++ b/table_transformer_detection/packages.txt @@ -0,0 +1,2 @@ +git +curl \ No newline at end of file diff --git a/table_transformer_detection/table-transformer-detection b/table_transformer_detection/table-transformer-detection deleted file mode 160000 index ab363aa..0000000 --- a/table_transformer_detection/table-transformer-detection +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ab363aa6ce9eba6b79b6547bfb219bdcb2de80f8