From 2f5b02706f344ce2719d2a5eed6e761b63483a7f Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 02:01:57 +0800 Subject: [PATCH 1/9] rebrand --- .github/workflows/build-docker.yml | 16 +++++++------- LICENSE | 1 + README.md | 32 +++++++++++++++++++--------- docker_HuggingFace-model/README.md | 14 ++++++------ docker_OpenFace/OpenSMILE.Dockerfile | 2 +- docker_PaddleOCR/README.md | 28 ++++++++++++------------ tool.sh | 2 +- 7 files changed, 54 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index edcbaec..fed4469 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -28,7 +28,7 @@ env: jobs: - qpod_PaddleOCR_cuda112: + job-PaddleOCR_cuda112: name: 'paddleocr-cuda112' runs-on: ubuntu-latest steps: @@ -40,7 +40,7 @@ jobs: echo 'build_image paddleocr-models latest docker_PaddleOCR/paddle-ocr-models.Dockerfile --build-arg "BASE_IMG=paddleocr-cuda112" --build-arg "BASE_NAMESPACE_SRC=docker.io/library"' push_image - qpod_PaddleOCR_cuda120: + job-PaddleOCR_cuda120: name: 'paddleocr-cuda120,doc-ai-cuda120' runs-on: ubuntu-latest steps: @@ -52,7 +52,7 @@ jobs: push_image - qpod_vllm-cuda: + job-vllm-cuda: name: 'vllm-cuda' runs-on: ubuntu-latest steps: @@ -62,7 +62,7 @@ jobs: build_image vllm-cuda latest docker_vllm/vllm-cuda.Dockerfile push_image - qpod_aidoc-miner: + job-aidoc-miner: name: 'aidoc-miner' runs-on: ubuntu-latest steps: @@ -73,7 +73,7 @@ jobs: push_image - qpod_OpenFace: + job-OpenFace: name: 'opencv,openface-src,openface' runs-on: ubuntu-latest steps: @@ -87,7 +87,7 @@ jobs: build_image openface latest docker_OpenFace/OpenFace.Dockerfile && push_image openface # To build HF model image for a single model, simple run: `build_image_hf_model bert-base-cased` - qpod_HuggingFaceModels: + job-HuggingFaceModels: name: 'huggingface-model' runs-on: ubuntu-latest steps: @@ -105,7 +105,7 @@ jobs: ## Sync all images in this build (listed by "names") to mirror registry. sync_images: - needs: ["qpod_OpenFace", "qpod_HuggingFaceModels", "qpod_aidoc-miner", "qpod_PaddleOCR_cuda112", "qpod_PaddleOCR_cuda120", "qpod_vllm-cuda"] + needs: ["job-OpenFace", "job-HuggingFaceModels", "job-aidoc-miner", "job-PaddleOCR_cuda112", "job-PaddleOCR_cuda120", "job-vllm-cuda"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -116,5 +116,5 @@ jobs: source ./tool.sh printf '%s' "$AUTH_FILE_CONTENT" > .github/workflows/auth.json && ls -alh ./.github/workflows printenv | grep -v 'PATH' > /tmp/docker.env && echo "REGISTRY_URL=${REGISTRY_DST}" >> /tmp/docker.env - docker run --rm --env-file /tmp/docker.env -v $(pwd):/tmp -w /tmp ${IMG_PREFIX_DST:-qpod}/docker-kit \ + docker run --rm --env-file /tmp/docker.env -v $(pwd):/tmp -w /tmp ${IMG_PREFIX_DST:-labnow}/docker-kit \ python /opt/utils/image-syncer/run_jobs.py --auth-file=/tmp/.github/workflows/auth.json diff --git a/LICENSE b/LICENSE index 56120c5..db1698a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ BSD 3-Clause License Copyright (c) 2020, QPod +Copyright (c) 2024, LabNow All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index fef6482..47a9d50 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,32 @@ -# QPod Media Lab - Docker Image Stack +# LabNow Container Image Stack - Lab Media [![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg)](https://opensource.org/licenses/BSD-3-Clause) -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/QPod/media-lab/build-docker.yml?branch=main)](https://github.com/QPod/media-lab/actions/workflows/build-docker.yml) -[![Join the Gitter Chat](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/QPod/) -[![Recent Code Update](https://img.shields.io/github/last-commit/QPod/media-lab.svg)](https://github.com/QPod/media-lab/stargazers) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/LabNow-ai/lab-media/build-docker.yml?branch=main)](https://github.com/LabNow-ai/lab-media/actions/workflows/build-docker.yml) +[![Recent Code Update](https://img.shields.io/github/last-commit/LabNow-ai/lab-media.svg)](https://github.com/LabNow-ai/lab-media/stargazers) +[![Visit Images on DockerHub](https://img.shields.io/badge/DockerHub-Images-green)](https://hub.docker.com/u/labnow) -Please generously STAR★ our project or donate to us! [![GitHub Starts](https://img.shields.io/github/stars/QPod/media-lab.svg?label=Stars&style=social)](https://github.com/QPod/media-lab/stargazers) +Please generously STAR★ our project or donate to us! [![GitHub Starts](https://img.shields.io/github/stars/LabNow-ai/lab-media.svg?label=Stars&style=social)](https://github.com/LabNow-ai/lab-media/stargazers) [![Donate-PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/haobibo) [![Donate-AliPay](https://img.shields.io/badge/Donate-Alipay-blue.svg)](https://raw.githubusercontent.com/wiki/haobibo/resources/img/Donate-AliPay.png) [![Donate-WeChat](https://img.shields.io/badge/Donate-WeChat-green.svg)](https://raw.githubusercontent.com/wiki/haobibo/resources/img/Donate-WeChat.png) -## Building blocks for multimedia media projects +Discussion and contributions are welcome: +[![Join the Discord Chat](https://img.shields.io/badge/Discuss_on-Discord-green)](https://discord.gg/kHUzgQxgbJ) +[![Open an Issue on GitHub](https://img.shields.io/github/issues/LabNow-ai/lab-media)](https://github.com/LabNow-ai/lab-media/issues) -Building blocks for the following multimedia project use cases are supported in this project: +## Lab Media - Building blocks for AI models and multimedia media projects + +`LabNow lab-media` ( + [DockerHub](https://hub.docker.com/u/labnow) + | [quay.io](https://quay.io/organization/labnow) + | [GitHub](https://github.com/LabNow-ai/lab-media) ) provides building blocks for the following AI and multi-modal / multi-media project use cases are supported in this project: + +- [Transformer models based on HuggingFace transformers](https://hub.docker.com/r/labnow/huggingface-model/tags) +- [OCR (based on paddlepaddle)](https://hub.docker.com/search?q=labnow%2Fpaddleocr) and [Document Intelligence](https://hub.docker.com/search?q=labnow%2Fdoc-ai) - Image/Video and Audio feature extraction -- [OCR](https://hub.docker.com/search?q=qpod%2Fpaddleocr) and [Document Intelligence](https://hub.docker.com/search?q=qpod%2Fdoc-ai) -- [Transformer models based on HuggingFace transformers](https://hub.docker.com/r/qpod/huggingface-model/tags) -- [Face Landmark Detection](https://hub.docker.com/search?q=qpod%2Fopenface) + +## Documentation & Tutorial +[Wiki & Document](https://labnow.ai) +| [中文使用指引(含中国网络镜像)](https://labnow-ai.feishu.cn/wiki/wikcn0sBhMtb1KNRSUTettxWstc) +| [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/LabNow-ai/lab-media) diff --git a/docker_HuggingFace-model/README.md b/docker_HuggingFace-model/README.md index 7d0d89d..f33c9d9 100644 --- a/docker_HuggingFace-model/README.md +++ b/docker_HuggingFace-model/README.md @@ -1,7 +1,7 @@ # Store and Download Huggingface Models via docker images -[![Docker Pulls](https://img.shields.io/docker/pulls/qpod/huggingface-model.svg)](https://hub.docker.com/r/qpod/huggingface-model) -[![Docker Starts](https://img.shields.io/docker/stars/qpod/huggingface-model.svg)](https://hub.docker.com/r/qpod/huggingface-model) +[![Docker Pulls](https://img.shields.io/docker/pulls/labnow/huggingface-model.svg)](https://hub.docker.com/r/labnow/huggingface-model) +[![Docker Starts](https://img.shields.io/docker/stars/labnow/huggingface-model.svg)](https://hub.docker.com/r/labnow/huggingface-model) These docker images help you to store and download Huggingface Models via docker images. @@ -12,7 +12,7 @@ This is especially useful when you are: ## Download HuggingFace Models as docker images -You can download the model files simply using `docker pull qpod/huggingface-model:bert-base-cased`, in which the tag name is the HuggingFace model repo name. +You can download the model files simply using `docker pull labnow/huggingface-model:bert-base-cased`, in which the tag name is the HuggingFace model repo name. The models files are stored at the `/home` directory in the docker images by default. @@ -25,26 +25,26 @@ For example, given a HuggingFace model `HF_MODEL_NAME='microsoft/DialoGPT-small' The shell code to do this conversion is: `HF_MODEL_TAG=$(echo ${HF_MODEL_NAME} | sed 's/\//./g' | tr '[:upper:]' '[:lower:]')`. -We have alrady pre-built several popular models, you can find a list of models here: https://hub.docker.com/r/qpod/huggingface-model/tags +We have alrady pre-built several popular models, you can find a list of models here: https://hub.docker.com/r/labnow/huggingface-model/tags ## Export the model files to local file system You can use the following commnad to export the model files stored in the docker images to your local file system. ```bash -# for model names, refer to dockerhub: https://hub.docker.com/r/qpod/huggingface-model/tags +# for model names, refer to dockerhub: https://hub.docker.com/r/labnow/huggingface-model/tags MODEL_NAME="bert-base-chinese" # choose a folder to store model files LOCAL_REPO="/tmp/models" mkdir -pv ${LOCAL_REPO} && cd ${LOCAL_REPO} -docker run --rm -it -v $(pwd):/tmp "qpod/huggingface-model:${MODEL_NAME}" +docker run --rm -it -v $(pwd):/tmp "labnow/huggingface-model:${MODEL_NAME}" ``` ## Build your own docker image which stores a customized HF model -refer to: https://github.com/QPod/media-lab/tree/main/docker_HuggingFace-model +refer to: https://github.com/LabNow-ai/lab-media/tree/main/docker_HuggingFace-model ```bash source tool.sh && source docker_HuggingFace-model/script-setup-huggingface.sh diff --git a/docker_OpenFace/OpenSMILE.Dockerfile b/docker_OpenFace/OpenSMILE.Dockerfile index a9d8bea..e16eb2b 100644 --- a/docker_OpenFace/OpenSMILE.Dockerfile +++ b/docker_OpenFace/OpenSMILE.Dockerfile @@ -1,7 +1,7 @@ # Distributed under the terms of the Modified BSD License. ARG BASE_NAMESPACE -ARG BASE_IMG="qpod/opencv" +ARG BASE_IMG="labnow/opencv" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} LABEL maintainer="haobibo@gmail.com" diff --git a/docker_PaddleOCR/README.md b/docker_PaddleOCR/README.md index c1af423..4b9a55e 100644 --- a/docker_PaddleOCR/README.md +++ b/docker_PaddleOCR/README.md @@ -2,25 +2,25 @@ ## PaddleOCR -### qpod/paddleocr-cuda102 -[![Docker Pulls](https://img.shields.io/docker/pulls/qpod/paddleocr-cuda102.svg)](https://hub.docker.com/r/qpod/paddleocr-cuda102) -[![Docker Starts](https://img.shields.io/docker/stars/qpod/paddleocr-cuda102.svg)](https://hub.docker.com/r/qpod/paddleocr-cuda102) +### labnow/paddleocr-cuda102 +[![Docker Pulls](https://img.shields.io/docker/pulls/labnow/paddleocr-cuda102.svg)](https://hub.docker.com/r/labnow/paddleocr-cuda102) +[![Docker Starts](https://img.shields.io/docker/stars/labnow/paddleocr-cuda102.svg)](https://hub.docker.com/r/labnow/paddleocr-cuda102) -### qpod/paddleocr-cuda112 -[![Docker Pulls](https://img.shields.io/docker/pulls/qpod/paddleocr-cuda112.svg)](https://hub.docker.com/r/qpod/paddleocr-cuda112) -[![Docker Starts](https://img.shields.io/docker/stars/qpod/paddleocr-cuda112.svg)](https://hub.docker.com/r/qpod/paddleocr-cuda112) +### labnow/paddleocr-cuda112 +[![Docker Pulls](https://img.shields.io/docker/pulls/labnow/paddleocr-cuda112.svg)](https://hub.docker.com/r/labnow/paddleocr-cuda112) +[![Docker Starts](https://img.shields.io/docker/stars/labnow/paddleocr-cuda112.svg)](https://hub.docker.com/r/labnow/paddleocr-cuda112) -### qpod/paddleocr-cuda116 -[![Docker Pulls](https://img.shields.io/docker/pulls/qpod/paddleocr-cuda116.svg)](https://hub.docker.com/r/qpod/paddleocr-cuda116) -[![Docker Starts](https://img.shields.io/docker/stars/qpod/paddleocr-cuda116.svg)](https://hub.docker.com/r/qpod/paddleocr-cuda116) +### labnow/paddleocr-cuda116 +[![Docker Pulls](https://img.shields.io/docker/pulls/labnow/paddleocr-cuda116.svg)](https://hub.docker.com/r/labnow/paddleocr-cuda116) +[![Docker Starts](https://img.shields.io/docker/stars/labnow/paddleocr-cuda116.svg)](https://hub.docker.com/r/labnow/paddleocr-cuda116) ## PaddleOCR Models -[![Docker Pulls](https://img.shields.io/docker/pulls/qpod/paddleocr-models.svg)](https://hub.docker.com/r/qpod/paddleocr-models) -[![Docker Starts](https://img.shields.io/docker/stars/qpod/paddleocr-models.svg)](https://hub.docker.com/r/qpod/paddleocr-models) +[![Docker Pulls](https://img.shields.io/docker/pulls/labnow/paddleocr-models.svg)](https://hub.docker.com/r/labnow/paddleocr-models) +[![Docker Starts](https://img.shields.io/docker/stars/labnow/paddleocr-models.svg)](https://hub.docker.com/r/labnow/paddleocr-models) ## Document Intelligence -### qpod/doc-ai-cuda112 -[![Docker Pulls](https://img.shields.io/docker/pulls/qpod/doc-ai-cuda112.svg)](https://hub.docker.com/r/qpod/doc-ai-cuda112) -[![Docker Starts](https://img.shields.io/docker/stars/qpod/doc-ai-cuda112.svg)](https://hub.docker.com/r/qpod/doc-ai-cuda112) +### labnow/doc-ai-cuda112 +[![Docker Pulls](https://img.shields.io/docker/pulls/labnow/doc-ai-cuda112.svg)](https://hub.docker.com/r/labnow/doc-ai-cuda112) +[![Docker Starts](https://img.shields.io/docker/stars/labnow/doc-ai-cuda112.svg)](https://hub.docker.com/r/labnow/doc-ai-cuda112) diff --git a/tool.sh b/tool.sh index 2f12ae8..26af720 100644 --- a/tool.sh +++ b/tool.sh @@ -1,7 +1,7 @@ #!/bin/bash set -xu -CI_PROJECT_NAME=${GITHUB_REPOSITORY:-"QPod/lab-media"} +CI_PROJECT_NAME=${GITHUB_REPOSITORY:-"LabNow-ai/lab-media"} CI_PROJECT_BRANCH=${GITHUB_HEAD_REF:-"main"} CI_PROJECT_SPACE=$(echo "${CI_PROJECT_BRANCH}" | cut -f1 -d'/') From 6b433342b4e3e4aab82aec9c0bf64718ec51f6f8 Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 02:33:00 +0800 Subject: [PATCH 2/9] debug --- .github/workflows/build-docker.yml | 2 +- docker_HuggingFace-model/Dockerfile | 2 +- docker_OpenFace/OpenCV.Dockerfile | 2 +- docker_OpenFace/OpenFace-src.Dockerfile | 2 +- docker_OpenFace/OpenFace.Dockerfile | 2 +- docker_OpenFace/OpenSMILE.Dockerfile | 2 +- docker_PaddleOCR/paddle-ocr-models.Dockerfile | 2 +- docker_PaddleOCR/paddle-ocr.Dockerfile | 2 +- docker_aidoc/miner.Dockerfile | 2 +- docker_vllm/vllm-cuda.Dockerfile | 6 +++--- tool.sh | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index fed4469..d2407e0 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -25,7 +25,7 @@ env: # used to sync image to mirror registry DOCKER_MIRROR_REGISTRY_USERNAME: ${{ vars.DOCKER_MIRROR_REGISTRY_USERNAME }} DOCKER_MIRROR_REGISTRY_PASSWORD: ${{ secrets.DOCKER_MIRROR_REGISTRY_PASSWORD }} - + CI_PROJECT_NAME: ${{ vars.CI_PROJECT_NAME || 'LabNow/lab-media' }} jobs: job-PaddleOCR_cuda112: diff --git a/docker_HuggingFace-model/Dockerfile b/docker_HuggingFace-model/Dockerfile index a4f76ca..2ab830c 100644 --- a/docker_HuggingFace-model/Dockerfile +++ b/docker_HuggingFace-model/Dockerfile @@ -5,7 +5,7 @@ FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} ARG HF_MODEL_NAME="answerdotai/ModernBERT-base" LABEL HF_MODEL_NAME="${HF_MODEL_NAME}" -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" LABEL usage="docker run --rm -it -v $(pwd):/tmp `docker-image-name`" CMD ["sh", "-c", "ls -alh /home && cp -rf /home/* /tmp/"] diff --git a/docker_OpenFace/OpenCV.Dockerfile b/docker_OpenFace/OpenCV.Dockerfile index 8ecb184..7adcfb4 100644 --- a/docker_OpenFace/OpenCV.Dockerfile +++ b/docker_OpenFace/OpenCV.Dockerfile @@ -4,7 +4,7 @@ ARG BASE_NAMESPACE ARG BASE_IMG="base" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" COPY work /opt/utils/ diff --git a/docker_OpenFace/OpenFace-src.Dockerfile b/docker_OpenFace/OpenFace-src.Dockerfile index aeeac4d..66dfaf8 100644 --- a/docker_OpenFace/OpenFace-src.Dockerfile +++ b/docker_OpenFace/OpenFace-src.Dockerfile @@ -2,7 +2,7 @@ ARG BASE_NAMESPACE ARG BASE_IMG="busybox" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" LABEL usage="docker run --rm -it -v $(pwd):/tmp `docker-image-name`" CMD ["sh", "-c", "ls -alh /home && cp -r /home/* /tmp/"] diff --git a/docker_OpenFace/OpenFace.Dockerfile b/docker_OpenFace/OpenFace.Dockerfile index 8e77785..142c3e6 100644 --- a/docker_OpenFace/OpenFace.Dockerfile +++ b/docker_OpenFace/OpenFace.Dockerfile @@ -6,7 +6,7 @@ FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} AS runtime FROM runtime -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" COPY --from=source /home /tmp COPY work /opt/utils/ diff --git a/docker_OpenFace/OpenSMILE.Dockerfile b/docker_OpenFace/OpenSMILE.Dockerfile index e16eb2b..625a108 100644 --- a/docker_OpenFace/OpenSMILE.Dockerfile +++ b/docker_OpenFace/OpenSMILE.Dockerfile @@ -4,7 +4,7 @@ ARG BASE_NAMESPACE ARG BASE_IMG="labnow/opencv" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" RUN set -eux && source /opt/utils/script-utils.sh \ ## Download and build OpenSMILE diff --git a/docker_PaddleOCR/paddle-ocr-models.Dockerfile b/docker_PaddleOCR/paddle-ocr-models.Dockerfile index b29944a..4b5a98e 100644 --- a/docker_PaddleOCR/paddle-ocr-models.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr-models.Dockerfile @@ -11,6 +11,6 @@ ARG BASE_NAMESPACE_SRC FROM ${BASE_NAMESPACE_SRC:+$BASE_NAMESPACE_SRC/}busybox COPY --from=builder /opt/.paddleocr /home/ LABEL MODEL_NAME="paddleocr" -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" LABEL usage="docker run --rm -it -v $(pwd):/tmp `docker-image-name`" CMD ["sh", "-c", "ls -alh /home && cp -r /home/* /tmp/"] diff --git a/docker_PaddleOCR/paddle-ocr.Dockerfile b/docker_PaddleOCR/paddle-ocr.Dockerfile index 0109162..6c9e723 100644 --- a/docker_PaddleOCR/paddle-ocr.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr.Dockerfile @@ -4,7 +4,7 @@ ARG BASE_NAMESPACE ARG BASE_IMG="paddle-cuda" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" COPY work /opt/utils/ diff --git a/docker_aidoc/miner.Dockerfile b/docker_aidoc/miner.Dockerfile index c2c8815..395f26b 100644 --- a/docker_aidoc/miner.Dockerfile +++ b/docker_aidoc/miner.Dockerfile @@ -6,7 +6,7 @@ ARG BASE_NAMESPACE ARG BASE_IMG="py-nlp-cuda128" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" RUN set -eux \ # ---------- diff --git a/docker_vllm/vllm-cuda.Dockerfile b/docker_vllm/vllm-cuda.Dockerfile index 01dca10..f541785 100644 --- a/docker_vllm/vllm-cuda.Dockerfile +++ b/docker_vllm/vllm-cuda.Dockerfile @@ -1,14 +1,14 @@ # Distributed under the terms of the Modified BSD License. ARG BASE_NAMESPACE -ARG BASE_IMG="torch-cuda126" +ARG BASE_IMG="torch-cuda128" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} -LABEL maintainer="haobibo@gmail.com" +LABEL maintainer="postmaster@labnow.ai" +# https://docs.vllm.ai/en/latest/getting_started/installation/gpu.html RUN set -eux && source /opt/utils/script-setup.sh \ && pip install vllm \ - # https://docs.vllm.ai/en/latest/getting_started/installation/gpu.html # && cd /tmp/ \ # && git clone https://github.com/vllm-project/vllm.git \ # && cd /tmp/vllm \ diff --git a/tool.sh b/tool.sh index 26af720..415d41f 100644 --- a/tool.sh +++ b/tool.sh @@ -1,7 +1,7 @@ #!/bin/bash set -xu -CI_PROJECT_NAME=${GITHUB_REPOSITORY:-"LabNow-ai/lab-media"} +CI_PROJECT_NAME=${CI_PROJECT_NAME:-$GITHUB_REPOSITORY} CI_PROJECT_BRANCH=${GITHUB_HEAD_REF:-"main"} CI_PROJECT_SPACE=$(echo "${CI_PROJECT_BRANCH}" | cut -f1 -d'/') @@ -9,7 +9,7 @@ if [ "${CI_PROJECT_BRANCH}" = "main" ] ; then # If on the main branch, docker images namespace will be same as CI_PROJECT_NAME's name space export CI_PROJECT_NAMESPACE="$(dirname ${CI_PROJECT_NAME})" ; else - # not main branch, docker namespace = {CI_PROJECT_NAME's name space} + "0" + {1st substr before / in CI_PROJECT_SPACE} + # not main branch, docker namespace = {CI_PROJECT_NAME's name space} + "-" + {1st substr before / in CI_PROJECT_SPACE} export CI_PROJECT_NAMESPACE="$(dirname ${CI_PROJECT_NAME})0${CI_PROJECT_SPACE}" ; fi From 632446e1098fa7b08f31b9f0fd4f085b4d27fe4b Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 02:56:00 +0800 Subject: [PATCH 3/9] debug paddleOcr --- .github/workflows/build-docker.yml | 16 +++++++--------- docker_PaddleOCR/paddle-ocr-models.Dockerfile | 2 +- docker_PaddleOCR/paddle-ocr.Dockerfile | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d2407e0..efa2bd6 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -28,27 +28,25 @@ env: CI_PROJECT_NAME: ${{ vars.CI_PROJECT_NAME || 'LabNow/lab-media' }} jobs: - job-PaddleOCR_cuda112: - name: 'paddleocr-cuda112' + job-PaddleOCR: + name: 'paddleocr' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: | source ./tool.sh && free_diskspace - build_image paddleocr-cuda112 latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=cuda_11.2" - echo 'paddleocr-models: temp disable the build caused by the paddle run on CPU server' - echo 'build_image paddleocr-models latest docker_PaddleOCR/paddle-ocr-models.Dockerfile --build-arg "BASE_IMG=paddleocr-cuda112" --build-arg "BASE_NAMESPACE_SRC=docker.io/library"' + build_image paddleocr-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=cuda_12.8" + build_image paddleocr-models latest docker_PaddleOCR/paddle-ocr-models.Dockerfile --build-arg "BASE_IMG=paddleocr-cuda" --build-arg "BASE_NAMESPACE_SRC=docker.io/library" push_image - job-PaddleOCR_cuda120: + job-doc-ai: name: 'paddleocr-cuda120,doc-ai-cuda120' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: | source ./tool.sh && free_diskspace - build_image paddleocr-cuda120 latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=cuda_12.0" - build_image doc-ai-cuda120 latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=py-nlp-cuda120" + build_image doc-ai-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=py-nlp-cuda128" push_image @@ -105,7 +103,7 @@ jobs: ## Sync all images in this build (listed by "names") to mirror registry. sync_images: - needs: ["job-OpenFace", "job-HuggingFaceModels", "job-aidoc-miner", "job-PaddleOCR_cuda112", "job-PaddleOCR_cuda120", "job-vllm-cuda"] + needs: ["job-OpenFace", "job-HuggingFaceModels", "job-aidoc-miner", "job-PaddleOCR", "job-doc-ai", "job-vllm-cuda"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/docker_PaddleOCR/paddle-ocr-models.Dockerfile b/docker_PaddleOCR/paddle-ocr-models.Dockerfile index 4b5a98e..2749062 100644 --- a/docker_PaddleOCR/paddle-ocr-models.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr-models.Dockerfile @@ -1,7 +1,7 @@ # Distributed under the terms of the Modified BSD License. ARG BASE_NAMESPACE -ARG BASE_IMG="paddle-cuda116" +ARG BASE_IMG="paddle-3.0" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} AS builder RUN set -eux \ && python /opt/utils/download_paddleocr_models.py \ diff --git a/docker_PaddleOCR/paddle-ocr.Dockerfile b/docker_PaddleOCR/paddle-ocr.Dockerfile index 6c9e723..1cbc42e 100644 --- a/docker_PaddleOCR/paddle-ocr.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr.Dockerfile @@ -1,7 +1,7 @@ # Distributed under the terms of the Modified BSD License. ARG BASE_NAMESPACE -ARG BASE_IMG="paddle-cuda" +ARG BASE_IMG="paddle-3.0" FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG} LABEL maintainer="postmaster@labnow.ai" From 0db512b5c24be241ce3e29c464d353d785594b4e Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 10:53:06 +0800 Subject: [PATCH 4/9] debug cuda --- docker_PaddleOCR/paddle-ocr.Dockerfile | 11 ++++++++--- docker_vllm/vllm-cuda.Dockerfile | 7 ++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docker_PaddleOCR/paddle-ocr.Dockerfile b/docker_PaddleOCR/paddle-ocr.Dockerfile index 1cbc42e..10694ca 100644 --- a/docker_PaddleOCR/paddle-ocr.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr.Dockerfile @@ -9,13 +9,18 @@ LABEL maintainer="postmaster@labnow.ai" COPY work /opt/utils/ RUN set -eux && source /opt/utils/script-setup.sh \ + # ----------------------------- + && export CUDA_VER=$(echo ${CUDA_VERSION:-"999"} | cut -c1-4 | sed 's/\.//' ) \ + && export IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ + && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ + # ----------------------------- # Step 1. install/update paddlepaddle - && URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html" \ + && URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/packages/stable/${IDX}/" \ && CUDA_VER=$(echo "${CUDA_VERSION:0:4}" | sed 's/\.//' ) \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ - && PADDLE_VER=$(pip index versions ${PADDLE} -f ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ + && PADDLE_VER=$(pip index versions ${PADDLE} -i ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ - && pip install ${V} -f ${URL_PYPI_PADDLE} \ + && pip install ${V} -i ${URL_PYPI_PADDLE} \ # Step 2. install required OS libs for PaddleOCR, mainly for images processing && apt-get -qq update -yq --fix-missing && apt-get -qq install -yq --no-install-recommends libgl1 libglib2.0-0 \ # Step 3. install PaddleOCR diff --git a/docker_vllm/vllm-cuda.Dockerfile b/docker_vllm/vllm-cuda.Dockerfile index f541785..74b3075 100644 --- a/docker_vllm/vllm-cuda.Dockerfile +++ b/docker_vllm/vllm-cuda.Dockerfile @@ -8,7 +8,12 @@ LABEL maintainer="postmaster@labnow.ai" # https://docs.vllm.ai/en/latest/getting_started/installation/gpu.html RUN set -eux && source /opt/utils/script-setup.sh \ - && pip install vllm \ + # ----------------------------- + && export CUDA_VER=$(echo ${CUDA_VERSION:-"999"} | cut -c1-4 | sed 's/\.//' ) \ + && export IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ + && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ + # ----------------------------- + && pip install vllm --extra-index-url "https://download.pytorch.org/whl/${IDX}" \ # && cd /tmp/ \ # && git clone https://github.com/vllm-project/vllm.git \ # && cd /tmp/vllm \ From 802d0b08f526886aeda03b699b590851ddffc8c7 Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 11:10:41 +0800 Subject: [PATCH 5/9] debug install --- .github/workflows/build-docker.yml | 4 ++-- docker_vllm/vllm-cuda.Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index efa2bd6..aa191f4 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v4 - run: | source ./tool.sh && free_diskspace - build_image paddleocr-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=cuda_12.8" + build_image paddleocr-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=cuda_12.6" build_image paddleocr-models latest docker_PaddleOCR/paddle-ocr-models.Dockerfile --build-arg "BASE_IMG=paddleocr-cuda" --build-arg "BASE_NAMESPACE_SRC=docker.io/library" push_image @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - run: | source ./tool.sh && free_diskspace - build_image doc-ai-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=py-nlp-cuda128" + build_image doc-ai-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=py-nlp-cuda126" push_image diff --git a/docker_vllm/vllm-cuda.Dockerfile b/docker_vllm/vllm-cuda.Dockerfile index 74b3075..848d1c2 100644 --- a/docker_vllm/vllm-cuda.Dockerfile +++ b/docker_vllm/vllm-cuda.Dockerfile @@ -13,7 +13,7 @@ RUN set -eux && source /opt/utils/script-setup.sh \ && export IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ # ----------------------------- - && pip install vllm --extra-index-url "https://download.pytorch.org/whl/${IDX}" \ + && pip install vllm --index-url "https://download.pytorch.org/whl/${IDX}" --extra-index-url "https://pypi.org/simple" \ # && cd /tmp/ \ # && git clone https://github.com/vllm-project/vllm.git \ # && cd /tmp/vllm \ From 37e07d146c019d9062b8e5a1f6c1fb41d3b94b85 Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 11:26:16 +0800 Subject: [PATCH 6/9] debug pip ver --- docker_PaddleOCR/paddle-ocr.Dockerfile | 2 +- docker_vllm/vllm-cuda.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_PaddleOCR/paddle-ocr.Dockerfile b/docker_PaddleOCR/paddle-ocr.Dockerfile index 10694ca..c6bcfff 100644 --- a/docker_PaddleOCR/paddle-ocr.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr.Dockerfile @@ -18,7 +18,7 @@ RUN set -eux && source /opt/utils/script-setup.sh \ && URL_PYPI_PADDLE="https://www.paddlepaddle.org.cn/packages/stable/${IDX}/" \ && CUDA_VER=$(echo "${CUDA_VERSION:0:4}" | sed 's/\.//' ) \ && PADDLE=$( [ -x "$(command -v nvcc)" ] && echo "paddlepaddle-gpu" || echo "paddlepaddle") \ - && PADDLE_VER=$(pip index versions ${PADDLE} -i ${URL_PYPI_PADDLE} | grep 'Available' | cut -d ":" -f 2 | tr ', ' '\n' | grep ${CUDA_VER:-'.'} | head -n 1) \ + && PADDLE_VER=$(pip index versions ${PADDLE} -i ${URL_PYPI_PADDLE} | grep 'Available' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1) \ && V=$(echo ${PADDLE}==${PADDLE_VER}) && echo "to install paddle: ${V}" \ && pip install ${V} -i ${URL_PYPI_PADDLE} \ # Step 2. install required OS libs for PaddleOCR, mainly for images processing diff --git a/docker_vllm/vllm-cuda.Dockerfile b/docker_vllm/vllm-cuda.Dockerfile index 848d1c2..8836a6a 100644 --- a/docker_vllm/vllm-cuda.Dockerfile +++ b/docker_vllm/vllm-cuda.Dockerfile @@ -13,7 +13,7 @@ RUN set -eux && source /opt/utils/script-setup.sh \ && export IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ # ----------------------------- - && pip install vllm --index-url "https://download.pytorch.org/whl/${IDX}" --extra-index-url "https://pypi.org/simple" \ + && pip install vllm --index-url "https://download.pytorch.org/whl/${IDX}" \ # && cd /tmp/ \ # && git clone https://github.com/vllm-project/vllm.git \ # && cd /tmp/vllm \ From 6763c61eb2b5814f26057e25dc72417816843429 Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 12:53:34 +0800 Subject: [PATCH 7/9] skip paddleOCR modesl now --- .github/workflows/build-docker.yml | 5 +++-- README.md | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index aa191f4..bfa4ffb 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -36,11 +36,12 @@ jobs: - run: | source ./tool.sh && free_diskspace build_image paddleocr-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=cuda_12.6" - build_image paddleocr-models latest docker_PaddleOCR/paddle-ocr-models.Dockerfile --build-arg "BASE_IMG=paddleocr-cuda" --build-arg "BASE_NAMESPACE_SRC=docker.io/library" + echo 'Skipping paddleocr-models build for now' + echo 'build_image paddleocr-models latest docker_PaddleOCR/paddle-ocr-models.Dockerfile --build-arg "BASE_IMG=paddleocr-cuda" --build-arg "BASE_NAMESPACE_SRC=docker.io/library"' push_image job-doc-ai: - name: 'paddleocr-cuda120,doc-ai-cuda120' + name: 'doc-ai-cuda126' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 47a9d50..ff5d7cb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ Discussion and contributions are welcome: `LabNow lab-media` ( [DockerHub](https://hub.docker.com/u/labnow) | [quay.io](https://quay.io/organization/labnow) - | [GitHub](https://github.com/LabNow-ai/lab-media) ) provides building blocks for the following AI and multi-modal / multi-media project use cases are supported in this project: + | [GitHub](https://github.com/LabNow-ai/lab-media) +) provides building blocks for the following AI and multi-modal / multi-media project use cases are supported in this project: - [Transformer models based on HuggingFace transformers](https://hub.docker.com/r/labnow/huggingface-model/tags) - [OCR (based on paddlepaddle)](https://hub.docker.com/search?q=labnow%2Fpaddleocr) and [Document Intelligence](https://hub.docker.com/search?q=labnow%2Fdoc-ai) From 0ddbe184d89c4297534162c3c48fddbad8546af7 Mon Sep 17 00:00:00 2001 From: haobibo Date: Fri, 12 Sep 2025 13:16:59 +0800 Subject: [PATCH 8/9] debug vllm install --- docker_vllm/vllm-cuda.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_vllm/vllm-cuda.Dockerfile b/docker_vllm/vllm-cuda.Dockerfile index 8836a6a..df4fca9 100644 --- a/docker_vllm/vllm-cuda.Dockerfile +++ b/docker_vllm/vllm-cuda.Dockerfile @@ -13,7 +13,7 @@ RUN set -eux && source /opt/utils/script-setup.sh \ && export IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-117}" || echo "cpu" ) \ && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ # ----------------------------- - && pip install vllm --index-url "https://download.pytorch.org/whl/${IDX}" \ + && pip install vllm --index-url "https://download.pytorch.org/whl/${IDX}" --extra-index-url https://pypi.org/simple \ # && cd /tmp/ \ # && git clone https://github.com/vllm-project/vllm.git \ # && cd /tmp/vllm \ From ccfddf6d487b0e87377fd8687b749585b356225f Mon Sep 17 00:00:00 2001 From: haobibo Date: Sat, 13 Sep 2025 10:15:18 +0800 Subject: [PATCH 9/9] fix imgs --- .github/workflows/build-docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index bfa4ffb..5dc8eae 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -29,7 +29,7 @@ env: jobs: job-PaddleOCR: - name: 'paddleocr' + name: 'paddleocr-cuda' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -47,7 +47,7 @@ jobs: - uses: actions/checkout@v4 - run: | source ./tool.sh && free_diskspace - build_image doc-ai-cuda latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=py-nlp-cuda126" + build_image doc-ai-cuda126 latest docker_PaddleOCR/paddle-ocr.Dockerfile --build-arg "BASE_IMG=py-nlp-cuda126" push_image