-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin process of packaging PRAGmatic
Building Pragmatic into a container image is fairly easy. podman build --build-arg IMAGE=quay.io/ramalama/rocm -t quay.io/ramalama/rocm-rag container-images/pragmatic Signed-off-by: Daniel J Walsh <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ARG IMAGE=quay.io/ramalama/ramalama:latest | ||
FROM $IMAGE | ||
|
||
COPY build_pragmatic.sh /tmp/ | ||
RUN sh /tmp/build_pragmatic.sh |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
clone_and_build_pragmatic() { | ||
git clone https://github.com/redhat-et/PRAGmatic | ||
cd PRAGmatic | ||
git submodule update --init --recursive | ||
PYTHON_VERSION="python3 -m" | ||
|
||
if [ "$(python3 --version)" \< "Python 3.11" ]; then | ||
dnf install -y python3.11 python3.11-pip | ||
PYTHON_VERSION="/usr/bin/python3.11 -m" | ||
fi | ||
|
||
${PYTHON_VERSION} pip install -r requirements.txt --prefix=/usr | ||
${PYTHON_VERSION} pip install --prefix=/usr . | ||
cd .. | ||
} | ||
|
||
clone_and_build_pragmatic | ||
rm -rf /var/cache/*dnf* /opt/rocm-*/lib/*/library/*gfx9* /root/.cache /root/buildinfo PRAGmatic | ||
dnf -y clean all | ||
ldconfig |