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 b42085c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions container-images/pragmatic/build_pragmatic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,19 @@ 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
grep -v docling requirements.txt > /tmp/nodocling.txt
cat /tmp/nodocling.txt
${PYTHON_VERSION} pip install -r /tmp/nodocling.txt --prefix=/usr
fi
${PYTHON_VERSION} pip install --prefix=/usr .
cd ..
}
Expand Down

0 comments on commit b42085c

Please sign in to comment.