infiniflow/ragflow (sha256:3a6a6e20b2cb9cfaaa9548d1623927f2a319d667e1d42118143160cbc3989183)
Published 2026-06-05 14:08:04 +08:00 by fjut
Installation
docker pull gitea.devops.1msoft.cn/fjut/infiniflow/ragflow@sha256:3a6a6e20b2cb9cfaaa9548d1623927f2a319d667e1d42118143160cbc3989183sha256:3a6a6e20b2cb9cfaaa9548d1623927f2a319d667e1d42118143160cbc3989183Image Layers
| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:c98b7645109cdf61ab97492b90629581b1b7cb925b9d58a5787a4aaeb719f2be in / |
| CMD ["/bin/bash"] |
| USER root |
| SHELL [/bin/bash -c] |
| ARG NEED_MIRROR=1 |
| WORKDIR /ragflow |
| RUN |1 NEED_MIRROR=1 /bin/bash -c mkdir -p /ragflow/rag/res/deepdoc /root/.ragflow # buildkit |
| RUN |1 NEED_MIRROR=1 /bin/bash -c tar --exclude='.*' -cf - /huggingface.co/InfiniFlow/text_concat_xgb_v1.0 /huggingface.co/InfiniFlow/deepdoc | tar -xf - --strip-components=3 -C /ragflow/rag/res/deepdoc # buildkit |
| RUN |1 NEED_MIRROR=1 /bin/bash -c cp -r /deps/nltk_data /root/ && cp /deps/tika-server-standard-3.3.0.jar /deps/tika-server-standard-3.3.0.jar.md5 /ragflow/ && cp /deps/cl100k_base.tiktoken /ragflow/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 && cp /deps/o200k_base.tiktoken /ragflow/fb374d419588a4632f3f557e76b4b70aebbca790 # buildkit |
| ENV TIKTOKEN_CACHE_DIR=/ragflow TIKA_SERVER_JAR=file:///ragflow/tika-server-standard-3.3.0.jar |
| ENV DEBIAN_FRONTEND=noninteractive |
| RUN |1 NEED_MIRROR=1 /bin/bash -c apt update && apt --no-install-recommends install -y ca-certificates; if [ "$NEED_MIRROR" == "1" ]; then sed -i 's|http://archive.ubuntu.com/ubuntu|https://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list.d/ubuntu.sources; sed -i 's|http://security.ubuntu.com/ubuntu|https://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list.d/ubuntu.sources; sed -i 's|http://ports.ubuntu.com/ubuntu-ports|https://mirrors.aliyun.com/ubuntu-ports|g' /etc/apt/sources.list.d/ubuntu.sources; fi; rm -f /etc/apt/apt.conf.d/docker-clean && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache && chmod 1777 /tmp && apt update && apt install -y build-essential libglib2.0-0 libglx-mesa0 libgl1 pkg-config libicu-dev libgdiplus default-jdk libatk-bridge2.0-0 libpython3-dev libgtk-4-1 libnss3 xdg-utils libgbm-dev libjemalloc-dev gnupg unzip curl wget git vim less ghostscript pandoc texlive texlive-latex-extra texlive-xetex texlive-lang-chinese fonts-freefont-ttf fonts-noto-cjk postgresql-client # buildkit |
| RUN |1 NEED_MIRROR=1 /bin/bash -c mkdir -p /usr/share/infinity/resource && if [ "$NEED_MIRROR" == "1" ]; then git clone --depth 1 --single-branch https://gitee.com/infiniflow/resource /tmp/resource; else git clone --depth 1 --single-branch https://github.com/infiniflow/resource.git /tmp/resource; fi && cp -r /tmp/resource/* /usr/share/infinity/resource && rm -rf /tmp/resource # buildkit |
| ARG NGINX_VERSION=1.31.0-1~noble |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c mkdir -p /etc/apt/keyrings && curl --retry 5 --retry-delay 2 --retry-all-errors -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /etc/apt/keyrings/nginx-archive-keyring.gpg && echo "deb [signed-by=/etc/apt/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/ubuntu/ noble nginx" > /etc/apt/sources.list.d/nginx.list && apt -o Acquire::Retries=5 update && apt -o Acquire::Retries=5 install -y nginx=${NGINX_VERSION} && apt-mark hold nginx # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c if [ "$NEED_MIRROR" == "1" ]; then mkdir -p /etc/uv && echo 'python-install-mirror = "https://registry.npmmirror.com/-/binary/python-build-standalone/"' > /etc/uv/uv.toml && echo '[[index]]' >> /etc/uv/uv.toml && echo 'url = "https://mirrors.aliyun.com/pypi/simple"' >> /etc/uv/uv.toml && echo 'default = true' >> /etc/uv/uv.toml; fi; arch="$(uname -m)"; if [ "$arch" = "x86_64" ]; then uv_arch="x86_64"; else uv_arch="aarch64"; fi; tar xzf "/deps/uv-${uv_arch}-unknown-linux-gnu.tar.gz" && cp "uv-${uv_arch}-unknown-linux-gnu/"* /usr/local/bin/ && rm -rf "uv-${uv_arch}-unknown-linux-gnu" && uv python install 3.13 # buildkit |
| ENV PYTHONDONTWRITEBYTECODE=1 DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 UV_HTTP_TIMEOUT=200 UV_HTTP_RETRIES=3 |
| ENV PATH=/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt purge -y nodejs npm && apt autoremove -y && apt update && apt install -y nodejs # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && apt update && arch="$(uname -m)"; if [ "$arch" = "arm64" ] || [ "$arch" = "aarch64" ]; then ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql18; else ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql17; fi || { echo "Failed to install ODBC driver"; exit 1; } # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c if [ "$(uname -m)" = "x86_64" ]; then unzip /chrome-linux64.zip && mv chrome-linux64 /opt/chrome && ln -s /opt/chrome/chrome /usr/local/bin/; elif [ "$(uname -m)" = "aarch64" ]; then apt-get install -y --no-install-recommends /chromium-arm64-debs/libdav1d6_*_arm64.deb /chromium-arm64-debs/libjpeg62-turbo_*_arm64.deb /chromium-arm64-debs/chromium-common_*_arm64.deb /chromium-arm64-debs/chromium_*_arm64.deb /chromium-arm64-debs/chromium-driver_*_arm64.deb && ln -sf /usr/bin/chromium /usr/local/bin/chrome; fi # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c if [ "$(uname -m)" = "x86_64" ]; then unzip -j /chromedriver-linux64.zip chromedriver-linux64/chromedriver && mv chromedriver /usr/local/bin/ && rm -f /usr/bin/google-chrome; fi # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c if [ "$(uname -m)" = "x86_64" ]; then dpkg -i /deps/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; elif [ "$(uname -m)" = "aarch64" ]; then dpkg -i /deps/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; fi # buildkit |
| USER root |
| WORKDIR /ragflow |
| ENV VIRTUAL_ENV=/ragflow/.venv |
| COPY /ragflow/.venv /ragflow/.venv # buildkit |
| ENV PATH=/ragflow/.venv/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENV PYTHONPATH=/ragflow/ |
| COPY web web # buildkit |
| COPY admin admin # buildkit |
| COPY api api # buildkit |
| COPY conf conf # buildkit |
| COPY deepdoc deepdoc # buildkit |
| COPY rag rag # buildkit |
| COPY agent agent # buildkit |
| COPY pyproject.toml uv.lock ./ # buildkit |
| COPY mcp mcp # buildkit |
| COPY common common # buildkit |
| COPY memory memory # buildkit |
| COPY bin bin # buildkit |
| ENV RAGFLOW_OFFLINE=1 HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 HF_DATASETS_OFFLINE=1 |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c .venv/bin/python3 - <<'PY' import os from pathlib import Path required_paths = [ Path('/ragflow/9b5ad71b2ce5302211f9c61530b329a4922fc6a4'), Path('/ragflow/fb374d419588a4632f3f557e76b4b70aebbca790'), Path('/ragflow/tika-server-standard-3.3.0.jar'), Path('/ragflow/rag/res/deepdoc/det.onnx'), Path('/ragflow/rag/res/deepdoc/rec.onnx'), Path('/ragflow/rag/res/deepdoc/layout.onnx'), Path('/ragflow/rag/res/deepdoc/layout.laws.onnx'), Path('/ragflow/rag/res/deepdoc/layout.manual.onnx'), Path('/ragflow/rag/res/deepdoc/layout.paper.onnx'), Path('/ragflow/rag/res/deepdoc/tsr.onnx'), Path('/ragflow/rag/res/deepdoc/updown_concat_xgb.model'), ] missing = [str(path) for path in required_paths if not path.exists()] if missing: raise SystemExit('Missing offline runtime resources: ' + ', '.join(missing)) import nltk for resource in ('corpora/wordnet', 'tokenizers/punkt', 'tokenizers/punkt_tab'): nltk.data.find(resource) os.environ['TIKTOKEN_CACHE_DIR'] = '/ragflow' import tiktoken for encoding in ('cl100k_base', 'o200k_base'): tiktoken.get_encoding(encoding) PY # buildkit |
| COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template # buildkit |
| COPY docker/entrypoint.sh ./ # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c chmod +x ./entrypoint*.sh # buildkit |
| COPY docker/nginx/ragflow.conf.golang docker/nginx/ragflow.conf.python docker/nginx/ragflow.conf.hybrid docker/nginx/nginx.conf docker/nginx/proxy.conf /etc/nginx/ # buildkit |
| RUN |2 NEED_MIRROR=1 NGINX_VERSION=1.31.0-1~noble /bin/bash -c mv /etc/nginx/ragflow.conf.golang /etc/nginx/conf.d/ragflow.conf.golang && mv /etc/nginx/ragflow.conf.python /etc/nginx/conf.d/ragflow.conf.python && mv /etc/nginx/ragflow.conf.hybrid /etc/nginx/conf.d/ragflow.conf.hybrid && rm -f /etc/nginx/sites-enabled/default # buildkit |
| COPY /ragflow/web/dist /ragflow/web/dist # buildkit |
| COPY /ragflow/VERSION /ragflow/VERSION # buildkit |
| ENTRYPOINT ["./entrypoint.sh"] |
Labels
| Key | Value |
|---|---|
| org.opencontainers.image.version | 24.04 |
Details
2026-06-05 14:08:04 +08:00
Versions (3)
View all
Container
1
OCI / Docker
linux/arm64
3.0 GiB