-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #831 from containers/ci-fixes
Make CI build all images
- Loading branch information
Showing
11 changed files
with
85 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,43 @@ | ||
#!/bin/bash | ||
|
||
set -exu -o pipefail | ||
|
||
export PYTHON_VERSION="python3 -m" | ||
if [ "$(python3 --version)" \< "Python 3.11" ]; then | ||
dnf install -y python3.11 python3.11-pip git | ||
export PYTHON_VERSION="/usr/bin/python3.11 -m" | ||
else | ||
dnf install -y python3-pip git | ||
fi | ||
|
||
cuda="cu124" | ||
|
||
rocm="rocm6.2" | ||
|
||
cpu="cpu" | ||
|
||
vulkan=$cpu | ||
|
||
asahi=$cpu | ||
|
||
install_pytorch() { | ||
version=${!1} | ||
echo ${PYTHON_VERSION} pip install torch==${version} -f https://download.pytorch.org/whl/torch_stable.html | ||
${PYTHON_VERSION} pip install torch==${version} -f https://download.pytorch.org/whl/torch_stable.html | ||
} | ||
|
||
clone_and_build_pragmatic() { | ||
git clone https://github.com/redhat-et/PRAGmatic | ||
cd PRAGmatic | ||
git submodule update --init --recursive | ||
|
||
local url="https://download.pytorch.org/whl" | ||
if [ "$2" == "docling" ]; then | ||
${PYTHON_VERSION} pip install docling --extra-index-url https://download.pytorch.org/whl/$1 | ||
${PYTHON_VERSION} pip install docling --extra-index-url "$url/$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 | ||
${PYTHON_VERSION} pip install torch --extra-index-url "$url/$1" | ||
local tmpfile | ||
tmpfile=$(mktemp) | ||
grep -v docling requirements.txt > ${tmpfile} | ||
${PYTHON_VERSION} pip install -r /tmp/nodocling.txt --prefix=/usr | ||
rm ${tmpfile} | ||
grep -v docling requirements.txt > "${tmpfile}" | ||
${PYTHON_VERSION} pip install -r "${tmpfile}" --prefix=/usr | ||
rm "${tmpfile}" | ||
fi | ||
|
||
${PYTHON_VERSION} pip install --prefix=/usr . | ||
cd .. | ||
} | ||
|
||
clone_and_build_pragmatic ${!1} $2 | ||
rm -rf /var/cache/*dnf* /opt/rocm-*/lib/*/library/*gfx9* /root/.cache /root/buildinfo PRAGmatic | ||
dnf -y clean all | ||
ldconfig | ||
main() { | ||
set -exu -o pipefail | ||
|
||
export PYTHON_VERSION="python3 -m" | ||
if [ "$(python3 --version)" \< "Python 3.11" ]; then | ||
dnf install -y python3.11 python3.11-pip git | ||
export PYTHON_VERSION="/usr/bin/python3.11 -m" | ||
else | ||
dnf install -y python3-pip git | ||
fi | ||
|
||
clone_and_build_pragmatic "$1" "$2" | ||
rm -rf /var/cache/*dnf* /opt/rocm-*/lib/*/library/*gfx9* /root/.cache \ | ||
/root/buildinfo PRAGmatic | ||
dnf -y clean all | ||
ldconfig | ||
} | ||
|
||
main "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters