Skip to content

Commit

Permalink
Added tika jar into image to avoid downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhichang committed Nov 2, 2024
1 parent c7ea7e9 commit ce4d035
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ RUN --mount=type=bind,source=huggingface.co,target=/huggingface.co \
# Copy nltk data downloaded via download_deps.py
COPY nltk_data /root/nltk_data

# https://github.com/chrismattmann/tika-python
# This is the only way to run python-tika without internet access. Without this set, the default is to check the tika version and pull latest every time from Apache.
COPY tika-server-standard-3.0.0.jar tika-server-standard-3.0.0.jar.md5 /
ENV TIKA_SERVER_JAR="file:////tika-server-standard.jar"

# Copy compiled web pages
COPY --from=builder /ragflow/web/dist /ragflow/web/dist

Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ RUN --mount=type=bind,source=huggingface.co,target=/huggingface.co \
# Copy nltk data downloaded via download_deps.py
COPY nltk_data /root/nltk_data

# https://github.com/chrismattmann/tika-python
# This is the only way to run python-tika without internet access. Without this set, the default is to check the tika version and pull latest every time from Apache.
COPY tika-server-standard-3.0.0.jar tika-server-standard-3.0.0.jar.md5 /
ENV TIKA_SERVER_JAR="file:////tika-server-standard.jar"

# Copy compiled web pages
COPY --from=builder /ragflow/web/dist /ragflow/web/dist

Expand Down
2 changes: 2 additions & 0 deletions download_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

urls = [
"http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb",
"https://repo1.maven.org/maven2/org/apache/tika/tika-server-standard/3.0.0/tika-server-standard-3.0.0.jar",
"https://repo1.maven.org/maven2/org/apache/tika/tika-server-standard/3.0.0/tika-server-standard-3.0.0.jar.md5",
]

repos = [
Expand Down

0 comments on commit ce4d035

Please sign in to comment.