Skip to content

Commit

Permalink
Allow users to build RAG versus Docling images
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Feb 5, 2025
1 parent 032efae commit 5dfc878
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions container-images/pragmatic/build_pragmatic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ install_pytorch() {
}

clone_and_build_pragmatic() {
if [ "$2" == "docling" ]; then
${PYTHON_VERSION} pip install docling --extra-index-url https://download.pytorch.org/whl/$1
fi
git clone https://github.com/redhat-et/PRAGmatic
cd PRAGmatic
git submodule update --init --recursive

${PYTHON_VERSION} pip install -r requirements.txt --prefix=/usr
if [ "$2" == "docling" ]; then
${PYTHON_VERSION} pip install docling --extra-index-url https://download.pytorch.org/whl/$1
${PYTHON_VERSION} pip install -r requirements.txt --prefix=/usr
else
${PYTHON_VERSION} pip install torch --extra-index-url https://download.pytorch.org/whl/$1
tmpfile=$(mktemp)
grep -v docling requirements.txt > ${tmpfile}
${PYTHON_VERSION} pip install -r /tmp/nodocling.txt --prefix=/usr
rm ${tmpfile}
fi
${PYTHON_VERSION} pip install --prefix=/usr .
cd ..
}
Expand Down

0 comments on commit 5dfc878

Please sign in to comment.