Skip to content

Commit

Permalink
Merge pull request #744 from rhatdan/pragmatic
Browse files Browse the repository at this point in the history
Allow users to build RAG versus Docling images
  • Loading branch information
ericcurtin authored Feb 6, 2025
2 parents 032efae + 5dfc878 commit 3477a13
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 3477a13

Please sign in to comment.