Skip to content

Commit

Permalink
Begin process of packaging PRAGmatic
Browse files Browse the repository at this point in the history
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
rhatdan committed Jan 22, 2025
1 parent f9dae2c commit db8a756
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions container-images/pragmatic/Containerfile
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
22 changes: 22 additions & 0 deletions container-images/pragmatic/build_pragmatic.sh
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

0 comments on commit db8a756

Please sign in to comment.