Compare commits

...

987 Commits
v1.0.0 ... main

Author SHA1 Message Date
Platform Engineering Bot 63a83a7398
fix(deps): update auto merged updates (#880)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-06-09 08:44:36 +03:00
Platform Engineering Bot 1bace0e7c5
fix(deps): update auto merged updates (#879)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-06-02 08:05:13 +03:00
Platform Engineering Bot 2f6980bd4d
fix(deps): update auto merged updates (#878)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-05-26 09:24:49 +03:00
Brian M cdf6cd5615
Fixed graphrag macos errors and really long load times for parsing documents (#876) 2025-05-21 13:44:14 +02:00
Jeff MAURY bbffacf06d
fix: update summarizer recipe for the ramalama images (#875) 2025-05-21 10:13:51 +02:00
Jeff MAURY a4b25dc8ac
fix: ajust PydanticAI recipe to latest release (#872) 2025-05-19 16:28:47 +02:00
Jeff MAURY 86fe2a196b
fix:object_detection_python build failure (#871) 2025-05-19 16:07:11 +02:00
Platform Engineering Bot b5a33f3e44
fix(deps): update auto merged updates (#870)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-05-19 08:24:30 +03:00
Platform Engineering Bot 2d3f0584fc
fix(deps): update auto merged updates (#869)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-05-12 07:54:22 +03:00
Daniel J Walsh 67b7b20c4e
Merge pull request #868 from bmahabirbu/react-fix
fix: fixed agent containerfile reqs and entrypoint
2025-05-05 10:45:48 -04:00
Brian 0e90ee18b1
fix: fixed agent containerfile reqs and entrypoint
Signed-off-by: Brian <bmahabir@bu.edu>
2025-05-05 02:57:08 -04:00
Platform Engineering Bot dfd85f2270
fix(deps): update auto merged updates (#867)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-05-05 08:24:59 +03:00
Daniel J Walsh 30fe56379a
Merge pull request #866 from containers/renovate/auto-merged-updates
fix(deps): update auto merged updates
LGTM
2025-04-30 09:00:51 -04:00
Platform Engineering Bot a5b965e0b2 fix(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-04-30 09:17:15 +00:00
Platform Engineering Bot eb476dd67b
fix(deps): update auto merged updates (#865)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-04-21 09:54:21 +03:00
Platform Engineering Bot e010fbef36
fix(deps): update auto merged updates (#864)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-04-14 09:14:32 +03:00
Platform Engineering Bot 0d68496a14
fix(deps): update auto merged updates (#863)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-04-07 08:14:19 +03:00
Brian M 900d38a9ee
Merge pull request #862 from bmahabirbu/graph-fix
fix: reduced token size and gracefully handle token limit errors
2025-03-28 12:22:36 -04:00
Brian ce3c39d7f0 fix: reduced token size and gracefully handle token limit errors
Signed-off-by: Brian <bmahabir@bu.edu>
2025-03-18 01:02:08 -04:00
Daniel J Walsh 418d2f3bf2
Merge pull request #861 from jeffmaury/GH-860
fix: NodeJS function calling is broken on Windows
2025-03-17 09:21:01 -04:00
Jeff MAURY 9224b9a1fc
fix: NodeJS function calling is broken on Windows
Fixes #860

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2025-03-17 12:46:24 +01:00
Daniel J Walsh 53def1030a
Merge pull request #858 from lholmquist/function_calling_nodejs
feat: Add Node.js Function calling example using langgraph.js
2025-03-14 14:24:38 -04:00
Daniel J Walsh 693420a04b
Merge pull request #859 from jeffmaury/add-jeffmaury
chore: add jeffmaury as code owner
2025-03-14 14:24:11 -04:00
Jeff MAURY bee419b497
chore: add jeffmaury as code owner
Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2025-03-14 15:10:39 +01:00
Lucas Holmquist 496950ebbf squash: change user after doing the npm install
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2025-03-13 15:26:44 -04:00
Lucas Holmquist f198fdd8a0 squash: set version for ubi image
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2025-03-10 12:36:24 -04:00
Lucas Holmquist 15d38622e3 squash: use ubi9
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2025-03-10 12:36:24 -04:00
Lucas Holmquist a380205467 squash: remove unneeded commented out code
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2025-03-10 12:34:10 -04:00
Lucas Holmquist 85e3af9a9d squash: update description
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2025-03-10 08:25:10 -04:00
Lucas Holmquist 5f9344a61d feat: add node.js function calling recipe with langgraph
* This recipe uses langchain.js and langgraph.js to create an AI application that does function calling

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
2025-03-10 08:25:10 -04:00
Daniel J Walsh 40630d417e
Merge pull request #855 from bmahabirbu/graph-fix
Fixed containerfile build issue
2025-03-09 00:35:18 -05:00
Daniel J Walsh 7de934e74a
Merge pull request #852 from containers/renovate/auto-merged-updates
fix(deps): update auto merged updates
2025-03-08 16:39:13 -05:00
Brian e62cabdd68 Updated permission fix for graphrag and pydantic ai recipe
Signed-off-by: Brian <bmahabir@bu.edu>
2025-03-07 19:52:42 -05:00
Platform Engineering Bot 4f1f7bcce5 fix(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-03-08 00:27:32 +00:00
Brian 1ff4148656 Fixed containerfile build issue
Signed-off-by: Brian <bmahabir@bu.edu>
2025-02-26 20:15:38 -05:00
Daniel J Walsh 12a5b37fcf
Merge pull request #854 from bmahabirbu/pydantic-readme
Added readme to pydantic recipe
2025-02-26 11:32:04 -05:00
Brian Mahabir f0a728bff1 Added readme to pydantic recipe
Signed-off-by: Brian Mahabir <56164556+bmahabirbu@users.noreply.github.com>
2025-02-26 11:25:16 -05:00
Daniel J Walsh a190e10127
Merge pull request #853 from bmahabirbu/grag
Added GraphRag Recipe using Lightrag repo
2025-02-26 10:29:52 -05:00
Brian df7bcc107c Added GraphRag Recipe using Lightrag repo
Signed-off-by: Brian <bmahabir@bu.edu>
2025-02-25 20:51:05 -05:00
Daniel J Walsh ef26248d4b
Merge pull request #849 from bmahabirbu/pydantic
Added pydantic-ai recipe
2025-02-24 08:56:32 -05:00
Brian M 759f22ba6d
Merge branch 'containers:main' into pydantic 2025-02-21 02:21:32 -05:00
Brian 6ff584f997 removed model bearer
Signed-off-by: Brian <bmahabir@bu.edu>
2025-02-17 22:37:01 -05:00
Brian 2485595815 Fixed permission issue in containerfile
Signed-off-by: Brian <bmahabir@bu.edu>
2025-02-17 22:08:28 -05:00
Daniel J Walsh a32ccb8f1d
Merge pull request #847 from containers/renovate/auto-merged-updates
fix(deps): update auto merged updates
2025-02-10 14:41:32 -05:00
Brian 956d857bbe Added pydantic-ai recipe
Signed-off-by: Brian <bmahabir@bu.edu>
2025-02-06 22:09:53 -05:00
Platform Engineering Bot c175e400cc fix(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-02-06 18:15:21 +00:00
Sally O'Malley 31875d393e
Merge pull request #848 from maorfr/gcp-mkdir-exists
cloud gcp mkdir handle existing directory
2025-01-28 09:36:12 -05:00
Maor Friedman 6eef634aa9 cloud gcp mkdir handle existing directory
Signed-off-by: Maor Friedman <mafriedm@redhat.com>
2025-01-28 16:21:42 +02:00
Daniel J Walsh 11fc2467f2
Merge pull request #842 from javipolo/cloud-user
Use cloud-user as a default username in AWS
2025-01-15 06:48:01 -05:00
Javi Polo 3d3dec93ed
Use cloud-user as a default username in AWS
Signed-off-by: Javi Polo <jpolo@redhat.com>
2025-01-15 11:45:13 +01:00
Gregory Pereira 28819abe5e
Merge pull request #841 from mhdawson/work-with-later-chroma
fix: update Rag Node.js recipie to make compatible with later chromadb version
2025-01-13 13:30:50 -08:00
Michael Dawson 4a8211e116 fix: update to make compatible with later chromadb version
https://github.com/containers/ai-lab-recipes/pull/806 updated the
version of chromadb used with the rag recipe when run with podman
ai lab.

Update the versions of Langchain and Chromadb clients to be compatible

Signed-off-by: Michael Dawson <mdawson@devrus.com>
2025-01-09 16:17:26 -05:00
Liora Milbaum 73be4fdb66
Merge pull request #840 from lmilbaum/remove-lmilbaum
lmilbaum removed from CODEOWNERS
2025-01-08 21:23:09 +02:00
Liora Milbaum a3e395644f lmilbaum removed from CODEOWNERS
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2025-01-08 21:22:37 +02:00
Daniel J Walsh 00ab6ef366
Merge pull request #834 from mhdawson/add-nodejs-rag
feat: add Node.js RAG recipe
2025-01-08 13:04:51 -05:00
Daniel J Walsh 146f92331b
Merge pull request #838 from sallyom/update-rag-manage-vector-db
update rag/app/manage_vectordb.py imports
2025-01-08 07:34:11 -05:00
Daniel J Walsh 52f7c72286
Merge pull request #839 from Gregory-Pereira/fix-rag-recipe-tagging-and-var-names
fix variable naming conventions
2025-01-08 07:33:47 -05:00
Michael Dawson f10622d2d7 squash: pin chromadb ver to match current client
pin the chromadb version when using quadlet and bootc to the
same one used when run with podman ai lab. Chromadb seems to
break comapibility regularly and the client must be compatible
with the chromadb version used.

Signed-off-by: Michael Dawson <mdawson@devrus.com>
2025-01-07 20:17:00 -05:00
Michael Dawson 35c5a9e02e squash: address comments
Signed-off-by: Michael Dawson <mdawson@devrus.com>
2025-01-07 18:22:06 -05:00
greg pereira f0af5e8790
fix variable naming conventions
Signed-off-by: greg pereira <grpereir@redhat.com>
2025-01-07 14:35:34 -08:00
Daniel J Walsh 26d4e6617b
Merge pull request #837 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2025-01-07 12:04:24 -05:00
Daniel J Walsh 92ef41d473
Merge pull request #828 from sallyom/rag-milvus
Documentation updates
2025-01-07 12:00:38 -05:00
Platform Engineering Bot db7ce279e7 chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-01-07 09:24:32 +00:00
sallyom 4088d68af7 update rag/app/manage_vectordb.py imports
Signed-off-by: sallyom <somalley@redhat.com>
2025-01-06 15:32:14 -05:00
sallyom 3d1ccf295a Documentation updates & .gitignore add
Signed-off-by: sallyom <somalley@redhat.com>
2025-01-06 15:25:59 -05:00
Liora Milbaum 60e6018c29
Merge pull request #836 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-12-23 06:44:34 +02:00
Platform Engineering Bot 3a49027131 chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-12-23 01:43:55 +00:00
Daniel J Walsh eceeb0dc81
Merge pull request #806 from containers/renovate/auto-merged-updates
fix(deps): update auto merged updates
2024-12-13 07:09:11 -05:00
Platform Engineering Bot 740e9c723d fix(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-12-12 10:54:01 +00:00
Gregory Pereira 8d2b5b9eb5
Merge pull request #835 from nerdalert/bash-bugs 2024-12-11 23:15:24 -08:00
Brent Salisbury 28525a47bd Fixed some readme bash in model_servers/llamacpp_python
Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
2024-12-12 01:29:23 -05:00
Michael Dawson d959db1316 feat: add Node.js RAG recipe
Signed-off-by: Michael Dawson <mdawson@devrus.com>
2024-12-04 17:27:14 -05:00
Daniel J Walsh 7fbdf03a8d
Merge pull request #833 from praveenkumar/fix_vulkan
Update mesa-vulkan-drivers from 23.3.3 to 24.1.2
2024-12-04 07:12:19 -05:00
Daniel J Walsh 6d90ca3237
Merge pull request #832 from praveenkumar/fix_doc_vulkan
Fix outdated containerfile link and add link about vulkan
2024-12-04 07:11:37 -05:00
Praveen Kumar 2e0c17b1e8 Update mesa-vulkan-drivers from 23.3.3 to 24.1.2
Signed-off-by: Praveen Kumar <kumarpraveen.nitdgp@gmail.com>
2024-12-04 14:09:01 +05:30
Praveen Kumar e41da812b3 Fix outdated containerfile link and add link about vulkan
Signed-off-by: Praveen Kumar <kumarpraveen.nitdgp@gmail.com>
2024-12-04 13:22:35 +05:30
Gregory Pereira c300271e37
Merge pull request #831 from sallyom/workflow-update
update models build & push workflow
2024-12-03 16:32:18 -08:00
sallyom 2e9475d59e update models build & push workflow
Signed-off-by: sallyom <somalley@redhat.com>
2024-12-03 19:28:10 -05:00
Gregory Pereira 0ea02c0f9d
Merge pull request #830 from sallyom/workflow-trigger-model-builds
allow update to model images
2024-12-03 15:30:30 -08:00
sallyom 3ac66e2a4f allow update to model images
Signed-off-by: sallyom <somalley@redhat.com>
2024-12-03 18:25:39 -05:00
Daniel J Walsh 7a7edc7c49
Merge pull request #827 from javipolo/disable-gcp-cloud-ops-agent
Disable google-cloud-ops-agent
2024-11-26 12:07:24 -05:00
Javi Polo aed7857507
Disable google-cloud-ops-agent
The current version of google-cloud-ops-agent is impacted by a CVE:
https://access.redhat.com/security/cve/CVE-2024-41110

Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-11-26 17:27:09 +01:00
Gregory Pereira 26b10d23c8
Merge pull request #825 from mhdawson/fix-expose-health
fix: bind to both local and externally visible IPs
2024-11-25 09:47:16 -08:00
Michael Dawson e6188ea86b fix: bind to both local and externally visible IPs
- allows both health check and app to work correctly

Signed-off-by: Michael Dawson <mdawson@devrus.com>
2024-11-25 11:41:27 -05:00
Gregory Pereira 5e2264c4d2
Merge pull request #823 from mhdawson/fix-annother-port
fix: fix another port number for Node.js chatbot
2024-11-22 15:11:11 -08:00
Michael Dawson 717be93ffc fix: fix another port number for Node.js chatbot
Signed-off-by: Michael Dawson <mdawson@devrus.com>
2024-11-22 18:05:59 -05:00
Gregory Pereira 33c0a23d73
Merge pull request #822 from mhdawson/fix-nodejs-recipe
fix: fix the port used by Node.js chatbot example
2024-11-22 12:47:26 -08:00
Michael Dawson ef6b12fdb7 fix: fix the port used by Node.js chatbot example
Signed-off-by: Michael Dawson <mdawson@devrus.com>
2024-11-22 15:30:16 -08:00
Daniel J Walsh 7d7fde0346
Merge pull request #821 from jeffmaury/GH-819
fix: update chatbot-nodejs to bind to localhost
2024-11-22 13:20:03 -05:00
Daniel J Walsh df0cb1e091
Merge pull request #820 from jeffmaury/GH-818
fix: update port for chatbot-nodejs
2024-11-22 13:19:20 -05:00
Jeff MAURY 56a975fc3e
fix: update chatbot-nodejs to bind to localhost
Fixes #819

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-11-22 18:37:01 +01:00
Jeff MAURY 5951769a8c
fix: update port for chatbot-nodejs
Fixes #818

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-11-22 18:15:13 +01:00
Daniel J Walsh e96d3b1dd4
Merge pull request #817 from jeffmaury/GH-816
fix: update chatbot-java-quarkus to be running on Windows
2024-11-21 16:23:40 -05:00
Jeff MAURY a4c37fc593
fix: update chatbot-java-quarkus to be running on Windows
Fixes #816

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-11-21 17:34:46 +01:00
Daniel J Walsh e7647afeff
Merge pull request #815 from feloy/fix-814/md-files-summarizer
fix: support application/octet-stream file type
2024-11-20 10:26:22 -05:00
Philippe Martin ec31a71c90 fix: support application/octet-stream file type
Signed-off-by: Philippe Martin <phmartin@redhat.com>
2024-11-20 09:27:08 +01:00
Daniel J Walsh 9e3acbafef
Merge pull request #810 from jeffmaury/GH-803
fix: use Chroma 0.5.16 as this is the last one working with the RAG r…
2024-11-15 01:45:49 -07:00
Daniel J Walsh a7b03d7bd0
Merge pull request #813 from jmartisk/quarkus-rename
Rename Quarkus example to chatbot-java-quarkus
2024-11-15 01:45:27 -07:00
Jan Martiska 09d00c6434 Rename Quarkus example to chatbot-java-quarkus, some minor metadata fixes
Signed-off-by: Jan Martiska <jmartisk@redhat.com>
2024-11-13 08:26:20 +01:00
Gregory Pereira d853a208b2
Merge pull request #800 from mhdawson/nodejs-chatbot-recipe-2
feat: add JavaScript/Node.js based chatbot recipe
2024-11-12 07:56:20 -08:00
Jeff MAURY fac827880a
fix: use Chroma 0.5.16 as this is the last one working with the RAG recipe
Fixes #803

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-11-08 19:03:40 +01:00
Daniel J Walsh d267075baa
Merge pull request #809 from jmartisk/quarkus-recipe
Recipe for a simple Quarkus-based chatbot
2024-11-08 11:14:14 -05:00
Jan Martiska 6e545870fb Recipe for a simple Quarkus-based chatbot
Signed-off-by: Jan Martiska <jmartisk@redhat.com>
2024-11-08 07:53:09 +01:00
Daniel J Walsh 6e33bfd468
Merge pull request #808 from suppathak/react-agents
Recipe for ReAct agent
2024-11-07 08:09:52 -05:00
Surya Prakash Pathak 6b8fba2e23 Added react-agent supporting files
Signed-off-by: Surya Prakash Pathak <supathak@redhat.com>
2024-11-04 16:48:49 -08:00
Michael Dawson 7fdd184fc8 squash: address comments
- remove provision directory

Signed-off-by: Michael Dawson <midawson@redhat.com>
2024-10-28 12:25:07 -04:00
Daniel J Walsh dcb2bc8e78
Merge pull request #804 from jeffmaury/GH-802
fix: update summarizer app to use correct url for token count
2024-10-28 08:57:35 -04:00
Jeff MAURY 4d15f1b563 fix: update summarizer app to use correct url for token count
Fixes #802

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-10-24 12:10:21 +02:00
Gregory Pereira e19f5f28f6
Merge pull request #805 from javipolo/not-blacklist-amdgpu
Do not blacklist amdgpu module
2024-10-23 11:22:49 -07:00
Javi Polo 5a42559693
Do not blacklist amdgpu module
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-10-16 19:16:30 +02:00
Daniel J Walsh 2b09302008
Merge pull request #799 from thepetk/feat/add_bearer_to_chatbot_and_codegen
Pass bearer to ChatOpenAI object
2024-10-11 15:31:20 -04:00
Daniel J Walsh 2c669ae468
Merge pull request #796 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-10-11 15:29:01 -04:00
Platform Engineering Bot 39ad4d5e70 chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-10-10 23:43:45 +00:00
thepetk e192e2afb4 Pass api_key to ChatOpenAI object
Signed-off-by: thepetk <thepetk@gmail.com>
2024-10-06 23:03:18 +01:00
Daniel J Walsh c6daa30fc6
Merge pull request #794 from jeffmaury/GH-562
feat: add function calling recipe
2024-10-02 09:24:00 -04:00
Daniel J Walsh e67cfbe413
Merge pull request #795 from fabiendupont/amd-bootc-shared-container-storage
amd-bootc: Share the additional container storage
2024-10-02 06:19:55 -04:00
Daniel J Walsh aaedd717e5
Merge pull request #797 from fabiendupont/nvidia-bootc-fix-shared-storage
NVIDIA bootc - Shared container storage fix
2024-10-02 06:19:08 -04:00
Daniel J Walsh 33f0d6c139
Merge pull request #790 from thepetk/ft/add_bearer_auth_support
Add Bearer (token) authentication support to recipes
2024-10-02 06:17:43 -04:00
Fabien Dupont 4ef60bd5ae NVIDIA bootc - Shared container storage fix
Follow-up #766

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-10-01 08:57:35 -04:00
Fabien Dupont 5d5a722f15 amd-bootc: Share the additional container storage
We need to share container image storage between rootless users, so that
we don't need `sudo` and we don't duplicate the `instructlab` image.
This change follows the Red Hat solution to
[create additional image store for rootless
users](https://access.redhat.com/solutions/6206192).

The `/usr/lib/containers/storage` folder can be read by anyone and new
users will inherit a default configuration via `/etc/skel` that
configures the additional storage.

The `ilab` wrapper is also modified to remove the impersonation code and
not use `sudo` anymore.

Follow-up on #766

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-09-27 08:20:28 -04:00
Jeff MAURY f421121cf3
fix: typo and unused imports
Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-09-25 14:57:14 +02:00
Jeff MAURY 900f54844f
feat: add function calling recipe
Fixes #562

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-09-25 00:02:50 +02:00
Daniel J Walsh 1e3999d75a
Merge pull request #793 from enriquebelarte/fix-bootc-script
Fix intel bootc script variable
2024-09-24 07:17:56 -04:00
Enrique Belarte Luque 4f91c5aebb
Fix intel bootc script variable
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-24 06:10:43 -05:00
Daniel J Walsh 773b899074
Merge pull request #792 from enriquebelarte/intel-mnt-secret
Add extra secrets for intel-bootc build
2024-09-24 06:42:30 -04:00
Enrique Belarte Luque 3b6232f5bf
Add extra secrets for intel-bootc build
Adds mount secret for using as auth/token for builds

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-24 04:47:14 -05:00
Daniel J Walsh 569c2dbe99
Merge pull request #789 from javipolo/gcp-ops-agent
RHELAI-1474 - Install Google Ops Agent
2024-09-23 13:14:56 -04:00
Daniel J Walsh 5d14b26637
Merge pull request #791 from enriquebelarte/intel-bootc-fix
Some fixes to intel Containerfile
2024-09-23 13:13:12 -04:00
Enrique Belarte Luque 9a63344de3
Some fixes to intel Containerfile
Not all devel packages can be removed as they're dependencies

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-23 11:31:48 -05:00
thepetk 9bd66e0c3e Add summarizer bearer auth support
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 14:13:11 +01:00
thepetk 9a4a08e280 Add bearer auth support to rag
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 14:00:22 +01:00
thepetk 9af5be0033 Add bearer auth support to codegen
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 13:44:13 +01:00
thepetk dd6c8d68ab Remove breakpoint
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 13:43:16 +01:00
thepetk c7524b8988 Add bearer auth support to chatbot
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 13:40:46 +01:00
thepetk 192b5d61dc Add bearer support to object-detection
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 13:32:06 +01:00
thepetk 381089ab63 Add bearer support to audo_to_text
Signed-off-by: thepetk <thepetk@gmail.com>
2024-09-23 13:26:51 +01:00
Liora Milbaum f2859613e4
Merge pull request #788 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-09-23 07:43:16 -04:00
Javi Polo 172dec0775
RHELAI-1474 - Install Google Ops Agent
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-09-23 12:33:44 +02:00
Platform Engineering Bot 65a7ffe390 chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-09-23 00:04:21 +00:00
Daniel J Walsh 375d8c8607
Merge pull request #766 from fabiendupont/nvidia-bootc-shared-container-storage
Share the additional container storage
2024-09-18 17:06:26 -04:00
Daniel J Walsh f20594edf3
Merge pull request #787 from enriquebelarte/fix-script-perms
Add exec permissions for script
2024-09-18 11:21:34 -04:00
Fabien Dupont fe98baf05e Share the additional container storage
We need to share container image storage between rootless users, so that
we don't need `sudo` and we don't duplicate the `instructlab` image.
This change follows the Red Hat solution to
[create additional image store for rootless users](https://access.redhat.com/solutions/6206192).

The `/usr/lib/containers/storage` folder can be read by anyone and new
users will inherit a default configuration via `/etc/skel` that
configures the additional storage.

The `ilab` wrapper is also modified to remove the impersonation code and
not use `sudo` anymore.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-09-18 11:13:41 -04:00
Enrique Belarte Luque 63775c9299
Add exec permissions for script
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-18 10:06:15 -05:00
Enrique Belarte Luque bc1c5896bc
Add exec permissions for script
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-18 10:01:42 -05:00
Daniel J Walsh c2f41788d5
Merge pull request #785 from Okoyl/driver-toolkit-fromimage
driver-toolkit make target fixes.
2024-09-18 09:07:00 -04:00
Daniel J Walsh 2149b2cc32
Merge pull request #786 from enriquebelarte/intel-1.17
Add intel-bootc multistage Containerfile
2024-09-18 09:05:26 -04:00
Enrique Belarte Luque a935767405
Remove devel packages
Remove -devel packages and bits not needed for runtime

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-18 07:41:35 -05:00
Enrique Belarte Luque 09f1638c3c
Add intel-bootc multistage Containerfile
Adds different steps for building required libraries, packages and dependencies for Intel Habanalabs

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-18 04:47:22 -05:00
Eli Elgaev ddb0be4b2f Added BASEIMAGE argument to driver-toolkit make target.
Signed-off-by: Eli Elgaev <eelgaev@redhat.com>
2024-09-17 16:56:39 +03:00
Eli Elgaev 838140abff Fixed a typo on driver-toolkit make target.
Signed-off-by: Eli Elgaev <eelgaev@redhat.com>
2024-09-17 16:56:39 +03:00
Daniel J Walsh 53ef429704
Merge pull request #780 from enriquebelarte/intel-bootc
Add workaround and update for intel-bootc
2024-09-16 11:37:42 -04:00
Daniel J Walsh 0d6072203b
Merge pull request #783 from containers/renovate/auto-merged-updates
chore(deps): update dependency urllib3 to v2.2.3
2024-09-16 11:36:42 -04:00
Daniel J Walsh bb78ca7669
Merge pull request #784 from relyt0925/python-ssl-control
Update environment preservation for Podman with python https ca control variables
2024-09-16 11:36:13 -04:00
Daniel J Walsh c690357f2f
Merge pull request #782 from fabiendupont/bootc-add-git-package
Bootc - Add git and git-lfs packages
2024-09-16 11:34:14 -04:00
Daniel J Walsh 04bbc25990
Merge pull request #781 from javipolo/cleanup_clouds
Remove duplicate packages
2024-09-16 11:33:27 -04:00
Tyler Lisowski 160997482a Update environment preservation for Podman with python https ca control variables
Add SSL_CERT_FILE and SSL_CERT_DIR to the preserved environment variables and ensure they are passed to Podman. This change ensures that SSL certificates are correctly handled within the container environment.

Signed-off-by: Tyler Lisowski <lisowski@us.ibm.com>
2024-09-16 09:59:31 -04:00
Platform Engineering Bot 423c4f52cf chore(deps): update dependency urllib3 to v2.2.3
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-09-16 00:04:29 +00:00
Fabien Dupont 3c6b84b12f Bootc - Add git and git-lfs packages
When working with AI/ML recipes, it is frequent to pull versioned
software and data from Git repositories. This change adds the `git`
and `git-lfs` packages.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-09-13 02:18:20 -04:00
Javi Polo 2fc29101d0
Remove duplicate packages
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-09-11 13:43:08 +02:00
Enrique Belarte Luque 1b55651d51
Add workaround and update for intel-bootc
Added workaround for libdnf,hl-smi binary and ilab wrapper.
Also added duplicated directory for common files working with Konflux CI.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-09-10 07:39:43 -05:00
Daniel J Walsh 185a957ec6
Merge pull request #779 from containers/renovate/auto-merged-updates
chore(deps): update dependency safetensors to v0.4.5
2024-09-09 08:41:14 -04:00
Platform Engineering Bot 2a3f188e43 chore(deps): update dependency safetensors to v0.4.5
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-09-09 02:43:35 +00:00
Javi Polo 2800b24ece
Merge pull request #778 from javipolo/cleanup_clouds
Remove already present symlinks for cloud services
2024-09-07 21:59:27 +02:00
Javi Polo b8bb85f840
Remove already present symlinks for cloud services
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-09-06 15:49:14 +02:00
Gregory Pereira ca3e16910b
Merge pull request #777 from pastequo/fix/cloud-build
fix(cloud): Workaround to avoid permission denied while building
2024-09-05 08:26:13 -07:00
Matthieu Bernardin d59dd733c9
fix(cloud): Workaround to avoid permission denied while building
Signed-off-by: Matthieu Bernardin <mbernard@redhat.com>
2024-09-05 16:08:54 +02:00
Daniel J Walsh 07a62ba8c7
Merge pull request #776 from javipolo/add_azure_to_examples
List all supported clouds in the README
2024-09-04 09:42:51 -04:00
Javi Polo 4096313598
List all supported clouds in the README
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-09-04 15:17:36 +02:00
Daniel J Walsh c05cd05d4a
Merge pull request #775 from javipolo/ibmcloud
Add cloud image for IBM Cloud
2024-09-04 08:53:08 -04:00
Javi Polo 85fc8275bd
Add cloud image for IBM Cloud
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-09-04 12:54:42 +02:00
Liora Milbaum d0bb62cc9e
Merge pull request #773 from containers/renovate/auto-merged-updates
Update Auto merged updates
2024-09-04 10:28:25 +03:00
Platform Engineering Bot 6066dd485b Update Auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-09-03 21:03:45 +00:00
Daniel J Walsh e96a0a94a5
Merge pull request #772 from javipolo/cloud-providers
Add customizations per cloud provider
2024-09-03 16:34:41 -04:00
Daniel J Walsh 2d03084179
Merge pull request #774 from fabiendupont/amd-bootc-update-to-rocm-6.2
Update amd-bootc to AMD ROCm 6.2
2024-09-03 10:54:17 -04:00
Javi Polo e7e7c96f59
Add customizations per cloud provider
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-09-03 12:39:41 +02:00
Fabien Dupont 21d985fd76 Update amd-bootc to AMD ROCm 6.2
This change updates the version of AMD ROCm to 6.2 in the amd-bootc
image for training. With this new version, the `rocm-smi` package is
replaced by the `amd-smi` package.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-09-03 02:55:51 -04:00
Daniel J Walsh fc758b5b8d
Merge pull request #767 from yevgeny-shnaidman/yevgeny/amd-bootc-6.1.2
updating AMD  bootc image
2024-08-29 06:43:44 -04:00
Daniel J Walsh 9f06613189
Merge pull request #768 from tiran/update-gaudi-1.17.1-40
Update Gaudi to latest release 1.17.1-40
2024-08-28 13:42:52 -04:00
Yevgeny Shnaidman 8c51b1bcd3
Merge pull request #1 from fabiendupont/amd-bootc-use-out-of-tree-drivers
Remove source stage for amd-bootc
2024-08-28 10:45:30 +03:00
Christian Heimes 519a59b89c Update Gaudi to latest release 1.17.1-40
1.17.1-40 was released on 2024-08-23.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
2024-08-27 17:23:01 +02:00
Fabien Dupont d33c8cba3b Remove source stage for amd-bootc
The multi-stage build has too many stages. During the installation of
the `amggpu-dkms` package, the modules are built and installed in
`/lib/modules/${KERNEL_VERSION}`. If the installation of the package is
done in the `driver-toolkit` image, the extra dependencies are very
limited. This change removes the `source` stage and installs the
`amdgpu-dkms` package on top of `driver-toolkit`.

The `amdgpu-dkms` packages installs the modules in
`/lib/modules/${KERNEL_VERSION}/extra` and these are the only modules in
that folder. The `amdgpu-dkms-firmware` package is installed as a
dependency of `admgpu-dkms` and it installs the firwmare files in
`/lib/firmware/updates/amdgpu·`. So, this change removes the in-tree
`amdgpu` modules and firmware, then copies the ones generated by DKMS in
the `builder` stage.

The change also moves the repository definitions to the `repos.d` folder
and adds the AMD public key to verify the signatures of the AMD RPMs.

The users call a wrapper script called `ilab` to hide the `instructlab`
container image and the command line options. This change copies the
file from `nvidia-bootc` and adjusts the logic. The main change is that
`/dev/kfd` and `/dev/dri` devices are passed to the container, instead
of `nvidia.com/gpu=all`. The `ilab` wrapper is copied in the `amd-bootc`
image.

The Makefile is also modified to reflect these changes.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-27 08:23:46 -04:00
Yevgeny Shnaidman 062841f724 updating AMD bootc image
1) using OOT driver and firmware instead of in-tree
2) moving to DKMS and ROCM 6.1.2 version

Signed-off-by: Yevgeny Shnaidman <yshnaidm@redhat.com>
2024-08-26 19:50:42 +03:00
Daniel J Walsh 87be4b4e0c
Merge pull request #765 from omertuc/main
ilab-wrapper: remove outdated comment
2024-08-21 06:41:21 -04:00
Omer Tuchfeld cf8d5fa716 ilab-wrapper: remove outdated comment
The comment is no longer relevant since we changed the way we pass
environment variables to the container.

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-08-21 12:04:47 +02:00
Jason T. Greene 954071b9d1
Merge pull request #764 from javipolo/revert-derived-container 2024-08-20 06:45:10 -05:00
Javi Polo d89ad9dede
RHELAI-969: Revert "Fix long container startup times"
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-20 11:36:48 +02:00
melodyliu1986 e82e739618
Add the huggingface token parameter, and modify the file path in llama.cpp repo. (#761)
Signed-off-by: Song Liu <soliu@redhat.com>
Co-authored-by: Song Liu <soliu@redhat.com>
2024-08-19 11:31:40 -04:00
Daniel J Walsh f6042944c2
Merge pull request #763 from n1hility/launch-perf
Fix long container startup times
2024-08-19 08:36:10 -04:00
Jason T. Greene 2f2d608f71 Fix long container startup times
The use of a uid map leads to a new layer with all files chowned.
This takes several seconds due to the size of the instructlab
container (26GB). Normally this would be a one time cost where
the idmap layer is cached and reusued accross container creations;
however, since the container is stored on a read-only additional
image store, no caching is performed.

Address the problem by creating a derived empty contianer in
mutable container storage. This allows the 1k idmap layer to be
created in the smae area, yet reuses the layers in additional
image store.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-08-19 02:08:08 +00:00
Daniel J Walsh b9aaba60c2
Merge pull request #757 from enriquebelarte/remove-retag
Remove retagging from ilab image
2024-08-16 06:15:48 -04:00
Daniel J Walsh 925607f9b3
Merge pull request #760 from axel7083/fix/update-backend-field
fix: backend property value
2024-08-16 06:14:58 -04:00
Liora Milbaum b90b59de2a
Merge pull request #759 from fabiendupont/nvidia-bootc-modify-fabricmanager-condition
Modify condition on NVIDIA FabricManager service
2024-08-14 16:09:34 +03:00
Fabien Dupont 9e8e131e29 Modify condition on NVIDIA FabricManager service
The `/dev/nvswitchctl` device is created by the NVIDIA Fabric Manager
service, so it cannot be a condition for the `nvidia-fabricmanager`
service.

Looking at the NVIDIA driver startup script for Kubernetes, the actual
check is the presence of `/proc/driver/nvidia-nvswitch/devices` and the
fact that it's not empty [1].

This change modifies the condition to
`ConditionDirectoryNotEmpty=/proc/driver/nvidia-nvswitch/devices`, which
verifies that a certain path exists and is a non-empty directory.

[1] https://gitlab.com/nvidia/container-images/driver/-/blob/main/rhel9/nvidia-driver?ref_type=heads#L262-269

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-14 08:26:16 -04:00
axel7083 2afdf5791a
fix: restore backend as an array for compatibility
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-14 14:25:59 +02:00
axel7083 2d16c137e6
fix: backend property value
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-14 14:10:47 +02:00
Daniel J Walsh 0ba38e07b1
Merge pull request #749 from axel7083/chore/tag-on-release
chore: tag model_servers images on release
2024-08-13 06:19:33 -04:00
Daniel J Walsh 346e1a1d57
Merge pull request #755 from javipolo/image_builder_remove_arch
Move --target-arch to image builder args
2024-08-13 06:16:04 -04:00
Enrique Belarte Luque ddda98a7f5
Remove retagging from ilab image
Retag is not needed as we are using static tags

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-08-13 04:10:37 -05:00
Javi Polo d2b6e806f2
Move --target-arch to image builder args
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-12 22:24:02 +02:00
Daniel J Walsh 18a6ad601e
Merge pull request #754 from javipolo/hardcode_xdg_runtime_dir_path
RHELAI-869: Hardcode XDG_RUNTIME_DIR path in case the variable does not exist
2024-08-12 13:41:26 -04:00
axel7083 2130f92cc6
chore: tag model_servers images on release
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

fix: missing $

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-12 15:38:10 +02:00
Daniel J Walsh 6c088a00b1
Merge pull request #750 from maysunfaisal/update-rag-2
Configure model for the rag recipe
2024-08-12 09:31:15 -04:00
Daniel J Walsh 5671010776
Merge pull request #753 from axel7083/chore/adding-markdown-file-input
chore(summarizer): adding markdown type file input
2024-08-12 09:29:43 -04:00
Javi Polo 6ad879874a
RHELAI-869: Hardcode XDG_RUNTIME_DIR path in case the variable does not exist
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-12 12:39:08 +02:00
axel7083 4f0ecc8f6a
fix: file type check
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-12 10:15:37 +02:00
axel7083 ce2ccb1fbc
chore(summarizer): adding markdown type file input
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-12 09:48:48 +02:00
Liora Milbaum b61c9089f7
Merge pull request #751 from fabiendupont/nvidia-add-package-with-firmwares
NVIDIA - Add the nvidia-driver package
2024-08-12 09:06:30 +03:00
Liora Milbaum 7f1d79d11a
Merge pull request #752 from n1hility/pids-limit
fix: resolve fork failures during training runs
2024-08-12 07:53:15 +03:00
Jason T. Greene ac7a55df4d fix: resolve fork failures during training runs
torchrun jobs create a number of children per GPU which can
often exceed the 2k limit.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-08-12 04:42:57 +00:00
Fabien Dupont 9cc28ca720 NVIDIA - Add the nvidia-driver package
The `nvidia-driver` package provides the firmware files for the given
driver version. This change removes the copy of the firmware from the
builder step and install the `nvidia-driver` package instead. This also
allows a better tracability of the files in the final image.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-10 02:27:02 -04:00
Maysun J Faisal 3a25158aa3 Configure model for rag recipe
Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
2024-08-09 17:51:01 -04:00
Gregory Pereira 224988970a
Merge pull request #747 from axel7083/patch-2
fix(whispercpp): adding missing ownership to user 1001 in app directory
2024-08-08 16:34:44 -07:00
Daniel J Walsh e0983807cf
Merge pull request #740 from fabiendupont/update-gaudi-to-1.17-0-495
Intel bootc - Update Gaudi drivers to 1.17.0-495
2024-08-08 16:28:12 -04:00
Daniel J Walsh 198d839a6c
Merge pull request #744 from lstocchi/fixTypo
fix: fix image name on chatbot ai-lab.yaml
2024-08-08 16:27:02 -04:00
Daniel J Walsh 42e77cb94f
Merge pull request #745 from javipolo/enforce_insights
RHELAI-838 Enforce insights registration in ilab wrapper
2024-08-08 16:25:51 -04:00
Liora Milbaum ddad8904d7
Merge pull request #746 from pastequo/nvidia-bootc/retag-instructlab-image
feat(nvidia-bootc): Retag instructlab image if INSTRUCTLAB_IMAGE_RETAG is specified
2024-08-08 19:57:46 +03:00
Javi Polo 25b36d83fd
RHELAI-838 Enforce insights registration in ilab wrapper~
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-08 18:04:12 +02:00
axel7083 beb3b12de7
fix(whisper_cpp): missing ownership
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-08 16:08:25 +02:00
axel7083 593bed4eb0
fix(whispercpp): set app ownership to user 1001
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-08 16:08:25 +02:00
Matthieu Bernardin 3d588a6ded
feat(nvidia-bootc): Retag instructlab image if INSTRUCTLAB_IMAGE_RETAG is specified
Signed-off-by: Matthieu Bernardin <mbernard@redhat.com>
2024-08-08 15:34:57 +02:00
lstocchi 5aed7d3a56
fix: fix image name on chatbot ai-lab.yaml
Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-08-08 14:17:42 +02:00
Fabien Dupont 0d6716c583 Intel bootc - Update Gaudi drivers to 1.17.0-495
Intel has released the version `1.17.0-495` of their Gaudi drivers. They
are available explicitly for RHEL 9.4 with a new `9.4` folder in the RPM
repository. This change updates the arguments to use the new version
from the new repository folder.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-08 05:10:01 -04:00
Javi Polo acb2b5d2e7
Merge pull request #736 from fabiendupont/get-kernel-version-from-bootc-image
Driver Toolkit: Get kernel version from bootc image
2024-08-08 10:57:03 +02:00
Fabien Dupont 78c57fecdf Driver Toolkit: Get kernel version from bootc image
When building the `driver-toolkit` image, It is cumbersome to find kernel
version that matches the future `nvidia-bootc` and `intel-bootc` images.
However, the kernel version is stored as a label on the `rhel-bootc`
images, which are exposed as the `FROM` variable in the Makefile.

This change collects the kernel version using `skopeo inspect` and `jq`.

The `DRIVER_TOOLKIT_BASE_IMAGE` variable is introduced in the Makefile
to dissociate it from the `FROM` variable that is used as the `nvidia-bootc`
and `intel-bootc` base image.

The user can now specify something like:

```shell
make nvidia-bootc \
    FROM=quay.io/centos-bootc/centos-bootc:stream9 \
    DRIVER_TOOLKIT_BASE_IMAGE=quay.io/centos/centos:stream9
```

Also, the `VERSION` variable in `/etc/os-release` is the full version, so
this change modifies the command to retrieve the `OS_VERSION_MAJOR`
value.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-08 02:56:27 -04:00
Gregory Pereira 198a13fdfc
Merge pull request #738 from javipolo/revert_insights_check
Revert "Enforce users to use insights"
2024-08-07 09:34:56 -07:00
Javi Polo 8c95438858
Revert "Enforce users to use insights"
This reverts commit d11890afb0.

Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-07 18:27:02 +02:00
Daniel J Walsh 102dc0106a
Merge pull request #734 from javipolo/insights-check
Enforce users to use insights
2024-08-07 11:51:38 -04:00
Daniel J Walsh ec7de55459
Merge pull request #735 from fabiendupont/fix-nvidia-bootc-driver-build
Fix the retrieval of kernel version, release and dist
2024-08-07 11:50:19 -04:00
Daniel J Walsh 04bccc6162
Merge pull request #730 from omertuc/bash
ilab-wrapper: Improve non-single subuid ranges error handling
2024-08-07 11:48:49 -04:00
Fabien Dupont 8dd087b9b3 Fix the retrieval of kernel version, release and dist
During the build of the out-of-tree drivers, the base image will always
have the `kernel-core` package installed. And the `Makefile` doesn't
pass the `KERNEL_VERSION` argument to the build command. So, it's
simpler to rely on the `kernel-core` package info.

The commands to get the `KREL` and `KDIST` were not working with RHEL
9.4 kernel. The new set of commands has been tested with `ubi9/ubi:9.4`
and `centos/centos:stream9` based driver toolkit image and they return
the correct value. For example, the values returned for the following
kernels are:

* `5.14.0-427.28.1.el9_4` (`ubi9:ubi:9.4`):
 * `KVER`: `5.14.0`
 * `KREL`: `427.28.1`
 * `KDIST`: `.el9_4`
* `5.14.0-427.el9` (`centos/centos:stream9`):
 * `KVER`: `5.14.0`
 * `KREL`: `427`
 * `KDIST`: `.el9`

The `OS_VERSION_MAJOR` argument is also not passed by the `Makefile`,
but we can get it from the `/etc/os-release` file. I'm switching to
grep+sed, because I don't want to load all the other variables.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-07 11:13:19 -04:00
Javi Polo d11890afb0
Enforce users to use insights
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-07 16:23:07 +02:00
Gregory Pereira b2c21f8174
Merge pull request #733 from fabiendupont/fix-nvidia-fabric-manager
Fix NVIDIA FabricManager unit file
2024-08-07 06:29:15 -07:00
Fabien Dupont 7363de42f7 Fix NVIDIA FabricManager unit file
In the `nvidia-bootc` Containerfile, the condition on the existence of
`/dev/nvswitchctl` in the `nvidia-fabricmanager` unit file is not
persisted, because we don't use the `-i` option of `sed`, so the final
image still always tries to load the service. This change adds the `-i`
option to fix this.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-07 07:37:59 -04:00
Omer Tuchfeld ae00e9e8c7 ilab-wrapper: Improve non-single subuid ranges error handling
# Background

df8885777d

# Issue

The current error handling for multiple subuid ranges is broken due to
surprising behavior of `wc -l` which always returns `1` even when the
input is empty.

# Solution

More carefully count the number of lines in the
`CURRENT_USER_SUBUID_RANGE` variable

# Additional changes

50fb00f26f had a small merge error, this
commit fixes that.

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-08-07 12:50:24 +02:00
Daniel J Walsh 188aaca941
Merge pull request #732 from omertuc/hooks
hooks: pre-commit hook to duplicate file
2024-08-07 06:39:09 -04:00
Omer Tuchfeld 1892603231 hooks: pre-commit hook to duplicate file
We have a file that's always a duplicate of another file, until we can
get rid of this requirement a pre-commit hook to take care of it would
be nice

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-08-07 12:24:24 +02:00
Daniel J Walsh 55fde6e527
Merge pull request #731 from n1hility/fix-vllm
Fix env passing that leads to failures
2024-08-07 06:19:33 -04:00
Jason T. Greene 83fb0cc3c5 Fix env passing that leads to failures
vLLM fails with empty set values. Adjust the model of env passing to
only set a value if it is defined.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-08-07 08:01:52 +00:00
Daniel J Walsh 15a3dc8d0b
Merge pull request #725 from jhutar/main
feat(KONFLUX-3933): Use rpm to get the value
2024-08-06 06:30:10 -04:00
Daniel J Walsh 66629562fe
Merge pull request #729 from omertuc/norootmap
ilab-wrapper: don't map UIDs if we're already running as root
2024-08-06 06:29:01 -04:00
Omer Tuchfeld 50fb00f26f ilab-wrapper: don't map UIDs if we're already running as root
# Background

See df8885777d

# Issue

Introduced a regression [1] where it's no longer possible to run the script
as root, as the subuid map ends up being empty and this causes an error:

```
Error: invalid empty host id at UID map: [1  1]
```

# Solution

Avoid UID mapping if we're already running as root.

# Motivation

We want to also be able to run the script as root, for example as part
of a systemd service.

[1] RHELAI-798

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-08-06 12:17:18 +02:00
Jan Hutar 49181d2c9b feat(KONFLUX-3933): Use rpm to get the value faster
Signed-off-by: Jan Hutar <jhutar@redhat.com>
2024-08-05 15:07:19 +02:00
Daniel J Walsh cc2447ea86
Merge pull request #726 from javipolo/ilab-auth
RHELAI-787: Mount auth.json into ilab container
2024-08-05 09:00:58 -04:00
Javi Polo 20d7d9ab2d
RHELAI-787: Mount auth.json into ilab container
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-05 14:33:17 +02:00
Daniel J Walsh 701564e62e
Merge pull request #718 from fabiendupont/simplify-driver-toolkit
Require KERNEL_VERSION argument in driver-toolkit
2024-08-05 07:00:13 -04:00
Daniel J Walsh 6edaa8447a
Merge pull request #723 from javipolo/coding_style
Comply with bashate style rules and remove exports
2024-08-05 06:58:46 -04:00
Daniel J Walsh 023faf132e
Merge pull request #703 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-08-05 06:39:38 -04:00
Fabien Dupont 1a16a7afb3 Require KERNEL_VERSION argument in driver-toolkit
The default base image for the Driver Toolkit image is `centos:stream9`.
The original work for Driver Toolkit is in OpenShift and the base image
is `ubi9/ubi`. In bother cases, the images don't have the `kernel`
package installed.

This change adds a test on the `KERNEL_VERSION` argument and exits if
it's not provided at build time. This also ensure that only the
relevant kernel is present when using `centos:stream9` or `ubi9/ubi`
as the base image. And this realigns a bit with the original Driver
Toolkit.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-08-05 06:07:07 -04:00
Javi Polo d238984ce6
Comply with bashate style rules and remove exports
- Set all indenting to 4 spaces (no tabs)
- Use POSIX style function definition in oneliner functions
- Remove unneeded exports on env variables

Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-04 17:16:37 +02:00
Platform Engineering Bot 7e9144deb7 chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-08-04 11:03:40 +00:00
Daniel J Walsh f767b292c5
Merge pull request #722 from relyt0925/fix-shm-size
Add environment variables for ilab container and increase shm size for vllm
2024-08-04 06:16:45 -04:00
Tyler Lisowski ea64b863ea Add environment variables for ilab container and increase shm size for vllm to 10GB
Include ILAB_GLOBAL_CONFIG, VLLM_LOGGING_LEVEL, and NCCL_DEBUG as environment variables when starting the ilab container. Also add shared memory size of 10G to enable vllm execution. Resolves: https://github.com/containers/ai-lab-recipes/issues/721

Signed-off-by: Tyler Lisowski <lisowski@us.ibm.com>
2024-08-04 00:25:49 -05:00
Daniel J Walsh 7eae618e81
Merge pull request #713 from omertuc/sudo
ilab-wrapper: Run podman with sudo
2024-08-02 11:23:37 -04:00
Daniel J Walsh 7184630e53
Merge pull request #719 from javipolo/ilab_no_path
Do not hardcode the path to ilab executable
2024-08-02 09:51:27 -04:00
Ryan Cook 1450e588be
Merge pull request #716 from maysunfaisal/update-rag-1
Set group permissions on the /rag/models/ dir
2024-08-02 09:47:07 -04:00
Javi Polo 3c156dceab
Do not hardcode the path to ilab executable
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-08-02 15:27:33 +02:00
Omer Tuchfeld df8885777d ilab-wrapper: Run podman with sudo
# Background

The ilab command is wrapped by an `ilab` script which launches ilab
inside a podman container.

# Issue

Since the ilab container image is pulled during the bootc image build
process using the root user, the image is not accessible to non-root
users.

# Solution

We run the container as sudo in order to be able to access the root
container storage. But for security reasons we map root UID 0 inside the
container to the current user's UID (and all the other subuids to the
user's /etc/subuid range) so that we're effectively running the
container as the current user.

# Additional changes

Changed `"--env" "HOME"` to `"--env" "HOME=$HOME"` to pass the HOME
environment variable from the current shell and not from the sudo
environment.

# Future work

In the future, we will run podman as the current user, once we figure a
reasonable way for the current user to access the root's user container
storage

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-08-02 11:56:28 +02:00
Maysun J Faisal a7b49e6475 Set group permissions on /rag/models/ dir
Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
2024-08-01 19:14:00 -04:00
Daniel J Walsh 151cc3bcf1
Merge pull request #714 from rhatdan/content
Update Containerfile
2024-08-01 11:15:26 -04:00
braultatgithub 4b3e572b24
Update Containerfile
small typo.

Thanks to @braultatgithub for pointing this out.

Replaces: https://github.com/containers/ai-lab-recipes/pull/702

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-08-01 11:13:49 -04:00
Daniel J Walsh ee0ac360bd
Merge pull request #708 from omertuc/volume
ilab wrapper: add support for additional mounts
2024-08-01 11:08:45 -04:00
Daniel J Walsh 97e781fe9f
Merge pull request #712 from axel7083/fix/env-prefix-missing
fix(model_server): missing prefix env
2024-08-01 11:06:47 -04:00
Daniel J Walsh a1525396db
Merge pull request #709 from javipolo/ilab_home_override
RHELAI-744 - Use environment variable to override HOME in ilab wrapper
2024-08-01 09:29:52 -04:00
axel7083 5c31bb5acf
fix(model_server): missing prefix env
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-08-01 10:37:02 +02:00
Javi Polo 107f8a9508
RHELAI-744 - Use environment variable to override HOME in ilab wrapper
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-31 16:59:47 +02:00
Omer Tuchfeld 8f71535e1b ilab wrapper: add support for additional mounts
# Background

We have an ilab wrapper script that users will use to launch the ilab
container.

Users may want to mount additional volumes into the container, as they
could possibly have e.g. large models stored in some external storage.

# Problem

Users cannot simply edit the script to add the mounts to the podman
command as it is read-only.

# Solution

Add support for an environment variable that users can set to specify
additional mounts to be added to the podman command. This will allow
users to specify additional mounts without having to modify the script.

# Implementation

The script will now check for the `ILAB_ADDITIONAL_MOUNTS` environment
variable. If it is set, the script will parse the variable as evaluated
bash code to get the mounts. The mounts will then be added to the podman
command.

Example `ILAB_ADDITIONAL_MOUNTS` usage:

```bash
ILAB_ADDITIONAL_MOUNTS="/host/path:/container/path /host/path2:/container/path2"`
```

If your path contains spaces, you can use quotes:

```bash
ILAB_ADDITIONAL_MOUNTS="/host/path:/container/path '/host/path with spaces':/container/path"
```

The latter works because the script uses `eval` to parse the mounts.

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-07-31 11:47:17 +02:00
Daniel J Walsh 7409fdca6b
Merge pull request #704 from axel7083/fix/cuda-build
fix(modell_server): deprecated make arguments for llamacpp server
2024-07-30 09:52:59 -04:00
Daniel J Walsh e273eaec86
Merge pull request #707 from omertuc/formatting
ilab wrapper: fix formatting
2024-07-30 09:51:54 -04:00
Omer Tuchfeld 34e60b1702 ilab wrapper: fix formatting
The wrapper had a mixed used of tabs/spaces, making it annoying to edit

Formatted with shfmt to switch to spaces

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-07-30 15:45:51 +02:00
axel7083 f60606d667
Apply suggestion from @Gregory-Pereira
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-30 13:11:42 +02:00
axel7083 4054ee7f4b
revert: requirements.txt
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-30 13:11:42 +02:00
axel7083 d32a55ebcf
chore: update pip package
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-30 13:11:42 +02:00
axel7083 36a32983ea
fix: replace deprecated LLAMA_CUBLAS with GGML_CUDA argument
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-30 13:11:41 +02:00
Daniel J Walsh f9ed8bbcbd
Merge pull request #693 from axel7083/patch-1
fix(run.sh): invalid bash formatting
2024-07-26 11:14:50 -04:00
Daniel J Walsh a508f36373
Merge pull request #691 from yangcao77/main
fix the photo upload issue in object detection app
2024-07-25 19:39:15 -04:00
Gregory Pereira 340d7f538b
Merge pull request #701 from pastequo/nvidia-bootc/fix/pull-secret-command
fix(nvidia-bootc): Use INSTRUCTLAB_IMAGE_PULL_SECRET in podman pull command
2024-07-25 10:49:57 -07:00
Matthieu Bernardin c05f23aad5
fix(nvidia-bootc): Use INSTRUCTLAB_IMAGE_PULL_SECRET in podman pull command
Signed-off-by: Matthieu Bernardin <mbernard@redhat.com>
2024-07-25 19:47:16 +02:00
Daniel J Walsh 85249c0d6b
Merge pull request #699 from pastequo/nvidia-bootc/fix/pull-secret
feat(nvidia-bootc): Introduce INSTRUCTLAB_IMAGE_PULL_SECRET
2024-07-25 11:29:12 -04:00
Daniel J Walsh f3cd9b5e5b
Merge pull request #700 from javipolo/split-bootc-targets
Split main targets into instructlab + bootc target
2024-07-25 11:27:59 -04:00
Matthieu Bernardin 735c8bd907
feat(nvidia-bootc): Introduce INSTRUCTLAB_IMAGE_PULL_SECRET as build-arg for Konflux build
Signed-off-by: Matthieu Bernardin <mbernard@redhat.com>
2024-07-25 17:24:10 +02:00
Gregory Pereira a7b41d1130
Merge pull request #696 from pastequo/nvidia-bootc/feat/remove-makefile-step
nvidia-bootc: Duplicate common lib & ilab, to avoid an intermediate makefile target
2024-07-25 08:19:28 -07:00
Javi Polo 0e8db9f2d2
Split main targets into instructlab + bootc target
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-25 17:01:57 +02:00
Matthieu Bernardin cc5c4d7ffe
chore(nvidia-bootc): Dupplicate ilab & common usr/lib to build in Konflux without running makefile targets 2024-07-25 16:48:13 +02:00
Daniel J Walsh f6ed0b31fc
Merge pull request #695 from kwozyman/rpm-args
Add support for changing Vendor and Buildhost for the driver RPM
2024-07-25 09:54:00 -04:00
Daniel J Walsh 7df349f701
Merge pull request #697 from omertuc/exec
ilab wrapper: `exec` for better signal handling / termination
2024-07-25 09:53:04 -04:00
Omer Tuchfeld 0f42ca1ca0 ilab wrapper: `exec` for better signal handling / termination
If the wrapper script is killed, the container will be left running.
Instead of just running the command, use `exec` to replace the
wrapper script with the command, so that the command will receive
the same signals as the wrapper script and the container will be
terminated as expected.

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-07-25 15:28:14 +02:00
Costin Gamenț 57a9745c1f Add support for changing Vendor and Buildhost for the driver RPM
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-07-25 15:15:21 +02:00
axel7083 5745071374
Update run.sh
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-24 18:28:10 +02:00
Stephanie 860393ea8b fix the photo upload issue
Signed-off-by: Stephanie <yangcao@redhat.com>
2024-07-24 10:53:36 -04:00
Daniel J Walsh 55610a8c90
Merge pull request #689 from javipolo/upgrade-informer-service
RHELAI-429: Adding upgrade informer service
2024-07-23 15:09:57 -04:00
Daniel J Walsh 577248bdee
Merge pull request #688 from rhatdan/skopeo
add skopeo so that ilab model download will work
2024-07-23 15:07:32 -04:00
Igal Tsoiref 5362188b72
RHELAI-429: Adding upgrade informer service
Upgrade informer will run every couple of our and will be triggered by
systemd timer.

In order to start it on boot and run once i enabled it and timer.
Disabling auto upgrade service in order to remove unexpected reboots.

Service will run "bootc upgrade --check" and in case new version exists
it will create motd file with upgrade info.

Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-23 20:18:38 +02:00
Daniel J Walsh 22889a2fd4
Merge pull request #690 from javipolo/remove-bootc-generic-growpart
RHEL-33208: Remove custom bootc-generic-growpart
2024-07-23 14:14:16 -04:00
Javi Polo 2e57b358ab
RHEL-33208: Remove custom bootc-generic-growpart
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-23 15:07:54 +02:00
Daniel J Walsh 1b044088a9
Merge pull request #687 from rhatdan/ilab
We do not use the ilab target in Containerfiles
2024-07-22 12:22:02 -04:00
Jeremy Eder aa1ede8f89 add skopeo so that ilab model download will work
While skopeo maybe part of the base image, there is no
guarantee, and as long as ilab requires it, we should
make sure it is installed.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-07-22 11:21:21 -04:00
Dan Walsh 0b5a769525 We do not use the ilab target in Containerfiles
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-07-22 11:11:53 -04:00
Daniel J Walsh 0c5d7f71c3
Merge pull request #685 from containers/renovate/auto-merged-updates
Update dependency numpy to v2.0.1
2024-07-22 08:21:01 -04:00
Platform Engineering Bot c38316de23 Update dependency numpy to v2.0.1
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-07-22 11:16:02 +00:00
Daniel J Walsh 2202bd6b77
Merge pull request #686 from eranco74/home
ilab wrapper script adjustments
2024-07-22 05:46:01 -04:00
Daniel J Walsh 38092ab1dd
Merge pull request #681 from johnmcollier/whispercppgid
Set group permissions on whispercpp app folder
2024-07-22 05:43:40 -04:00
Eran Cohen 9de79e561a ilab wrapper script adjustments
Background

RHEL AI ships with a script in `/usr/bin` called `ilab` which
makes running `ilab` commands feel native even though they're actually
running in a podman container

Issues

The abstraction becomes leaky once you start dealing with paths.
The user thinks it's local paths, but it's actually paths inside the pod,
and if the user is doing any action with a path that's not mounted inside the pod,
files persisted to that path will not persist across ilab wrapper invocations

Examples:
1. ilab config init outputs:
Generating `/root/.config/instructlab/config.yaml`...
Initialization completed successfully, you're ready to start using `ilab`. Enjoy!
But:
ls /root/.config/instructlab/config.yaml
ls: cannot access '/root/.config/instructlab/config.yaml': Permission denied

2. User provided paths e.g.:
ilab config init --model-path...
ilab model download --model-dir=...

The path may not be mounted to the host and the data is written to overlay fs and gone when the conatiner dies

Solution

Mount the user HOME direcotry and set the HOME inside the conainer
This seems to resolve the abouve issues as long the user provided paths
are nested under the user HOME direcotry

Signed-off-by: Eran Cohen <eranco@redhat.com>
2024-07-22 12:03:58 +03:00
Daniel J Walsh 5378fb0365
Merge pull request #682 from tsorya/igal/disable
RHELAI-524: Disable bootc auto upgrade service
2024-07-21 07:00:33 -04:00
Daniel J Walsh ca35deb154
Merge pull request #683 from javipolo/allow_instructlab_override
Allow INSTRUCTLAB_IMAGE value override
2024-07-21 06:59:11 -04:00
Daniel J Walsh 7aee0bb5ff
Merge pull request #651 from containers/renovate/auto-merged-updates
Update Auto merged updates
2024-07-20 06:24:23 -04:00
Platform Engineering Bot 1819201b50 Update Auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-07-20 09:04:15 +00:00
Javi Polo 15a8da9b83
Allow INSTRUCTLAB_IMAGE value override
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-19 13:35:11 +02:00
John Collier 86433985f0 Use COPY --chown instead
Signed-off-by: John Collier <jcollier@redhat.com>
2024-07-18 09:49:45 -04:00
Igal Tsoiref 0d352b0712 RHELAI-524: Disable bootc auto upgrade service
Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
2024-07-18 13:15:07 +03:00
Liora Milbaum 48eabdd864
Merge pull request #680 from omertuc/wrapper
`ilab` wrapper script adjustments
2024-07-18 12:29:57 +03:00
Liora Milbaum a6dd048193
Merge pull request #679 from tsorya/igal/rhel_ai_version
Changing os-release file parameter from BUILD_ID to RHEL_AI_VERSION
2024-07-17 21:26:43 +03:00
John Collier d029ebacb0 Set group permissions on whispercpp app folder
Signed-off-by: John Collier <jcollier@redhat.com>
2024-07-17 12:54:14 -04:00
Omer Tuchfeld 262758829a `ilab` wrapper script adjustments
Ticket [RHELAI-442](https://issues.redhat.com/browse/RHELAI-442)

# Background

RHEL AI ships with a script in `/usr/local/bin` called `ilab` which
makes running `ilab` commands feel native even though they're actually
running in a podman container

# Issues

* The script is outdated / used several different container images for
different purposes, while it should be just using the single instructlab
image

* The volume mounts were incorrect, as instructlab now uses XDG paths

* Unnecessary directory creation for `HF_CACHE`

* Unnecessary GPU count logic

* Script has unnecessary fiddling of `ilab` parameters, essentially creating a
  UX that deviates from the natural `ilab` CLI

# Solutions

* Changed script to use the single container image `IMAGE_NAME` (this
  was already the case mostly, except for old references to `LVLM_NAME`
  and `TRAIN_NAME` which no longer get replaced leading to a broken `PODMAN_COMMAND_SERVE`.
  Also adjusted entrypoint to use the `ilab` executable in the pyenv

* Will now mount the host's `~/.config` and `~/.local` into the
  container's corresponding directories, for `instructlab` to use
  and for its config / data to persist across invocations

* Will now mount `~/.cache` into the container's corresponding `.cache`
  directory, so that the information stored in the default `HF_CACHE` is
  also persisted across invocations

* Removed unnecessary GPU count logic

* Removed all parameter parsing / fiddling

# Other changes

Added secret/fake "shell" `ilab` subcommand which opens a shell in the
wrapper's container, useful for troubleshooting issues with the wrapper
itself

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
2024-07-17 17:09:33 +02:00
Igal Tsoiref 9d175ab5d9 Changing os-release file parameter from BUILD_ID to RHEL_AI_VERSION_ID as
it matches much better.
Changing the way we set image_version_id label, in order for it to work in
konflux we should use LABEL in container file

Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
2024-07-17 16:54:00 +03:00
Gregory Pereira 28ee9a81df
Merge pull request #675 from tsorya/igal/rhel_ai_version
In order set release version on upgrade we must override /usr/lib/os-release
2024-07-14 09:52:24 -07:00
Igal Tsoiref 0fa8d5db67 In order set release version on upgrade we must override
/usr/lib/os-release file and not /etc/os-release that is symlink to /usr/lib/os-release

Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
2024-07-14 18:35:01 +03:00
Liora Milbaum aa7d470ee4
Merge pull request #673 from tsorya/igal/rhel_ai_version
Fixing nvidia container file
2024-07-14 16:36:48 +03:00
Igal Tsoiref b497531c12 Fixing nvidia container file
Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
2024-07-14 15:16:43 +03:00
Liora Milbaum 3168496f83
Merge pull request #665 from tsorya/igal/rhel_ai_version
RHELAI-473: Adding rhel ai version
2024-07-14 14:31:26 +03:00
Michael Dawson b057fb0efe feat: add JavaScript/Node.js based chatbot recipe
Signed-off-by: Michael Dawson <mdawson@devrus.com>
2024-07-12 18:07:18 -04:00
Daniel J Walsh 3cab84caa3
Merge pull request #672 from ralphbean/whats-in-a-name
Switch PROVIDER name to HARDWARE
2024-07-12 13:58:51 -04:00
Ralph Bean cf0b33ec86
Switch PROVIDER name to HARDWARE
This better reflects its role.

Signed-off-by: Ralph Bean <rbean@redhat.com>
2024-07-12 12:28:12 -04:00
Daniel J Walsh 56ba5657db
Merge pull request #671 from ralphbean/label-args
Add vendor label and arg to all containerfiles
2024-07-12 10:09:37 -04:00
Ralph Bean 3f010293e0
Provide mechanism through Makefiles to set vendor label
Of note, there was already a use of a "VENDOR" word to describe the
accelerator or provider (amd, intel, nvidia, etc..). I renamed that
in order to make room for this new use of VENDOR.

Signed-off-by: Ralph Bean <rbean@redhat.com>
2024-07-12 10:04:34 -04:00
Ralph Bean ad2d008314
Reformat to make future edits more straightforward
Signed-off-by: Ralph Bean <rbean@redhat.com>
2024-07-12 10:04:29 -04:00
Igal Tsoiref e7bd5e3c62 Adding rhel ai version
Set github hash by defautl as image version.
Add RHEL_AI_VERSION into /etc/os-release in order to use it in
insights

Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
2024-07-12 15:46:19 +03:00
Ralph Bean f298fb684a
Add vendor label and arg to all containerfiles
So that downstream vendors can indicate themselves on their builds.

Signed-off-by: Ralph Bean <rbean@redhat.com>
2024-07-11 18:45:04 -04:00
Daniel J Walsh 6deab0f6b8
Merge pull request #669 from javipolo/fix_ssh_key
Fix SSH_PUBKEY expansion into build-arg
2024-07-11 14:42:13 -04:00
Javi Polo 2bafcd529e
Fix SSH_PUBKEY expansion into build-arg
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-11 20:27:06 +02:00
Gregory Pereira 5f5e6d0c25
Merge pull request #668 from javipolo/kernel_version_check
Check for driver and kernel version mismatch
2024-07-11 10:50:49 -07:00
Javi Polo 0ae96f7df1
Check for driver and kernel version mismatch
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-11 19:15:26 +02:00
Daniel J Walsh 3d1ae62b07
Merge pull request #667 from enriquebelarte/dtk-workaround
Add temp workaround for libdnf
2024-07-11 11:33:19 -04:00
Enrique Belarte Luque fdc948ac98
Add temp workaround for libdnf
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-07-11 10:20:44 -05:00
Daniel J Walsh 241e0e4465
Merge pull request #662 from fabiendupont/make-fabricmanager-conditional
Enable NVIDIA services in the bootc image
2024-07-10 06:37:37 -04:00
Daniel J Walsh 266831d92c
Merge pull request #661 from javipolo/ilab_wrapper_executable
Make sure ilab wrapper is executable and in path
2024-07-10 06:35:45 -04:00
Daniel J Walsh c989117ca4
Merge pull request #660 from containers/fix-testing-framework
fix testing-framework
2024-07-10 06:34:55 -04:00
Daniel J Walsh a2977733f2
Merge pull request #664 from jeffmaury/GH-654
fix: typo in object detection README
2024-07-10 06:34:34 -04:00
Jeff MAURY 0782f7e0ff
fix: typo in object detection README
Fixes #654

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-07-10 11:59:01 +02:00
sallyom 1ed1d0d61e fix testing-framework
Signed-off-by: sallyom <somalley@redhat.com>
2024-07-09 08:36:52 -04:00
Fabien Dupont 2b6cac5c3f Enable NVIDIA services in the bootc image
The `nvidia-persistenced` and `nvidia-fabricmanager` services should be
started on machines with NVIDIA devices. Fabric Manager is only needed
on machines with an NVLink switch, so we patch it to start only if
/dev/nvswitchctl is present.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-07-09 05:37:20 -04:00
Javi Polo 2d269cfbf6
Make sure ilab wrapper is executable and in path
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-07-08 20:21:39 +02:00
Daniel J Walsh 94651295b9
Merge pull request #659 from tsorya/igal/insights
Adding rhc for telemetry
2024-07-08 12:40:04 -04:00
Igal Tsoiref 274a840c89 Adding rhc connect for telemetry
Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
2024-07-07 17:21:19 +03:00
Liora Milbaum 67e8135002
Merge pull request #653 from fabiendupont/nvidia-align-driver-and-cuda
Update NVIDIA driver and CUDA in nvidia-bootc
2024-07-04 15:33:00 +03:00
Liora Milbaum 610d8ece3b
Merge pull request #656 from ralphbean/pull-with-auth
Pull instructlab image with auth, if provided
2024-07-03 15:34:03 +03:00
Ralph Bean 9494909d6c
Pull instructlab image with auth, if provided
Upstream, this image can be pulled unauthenticated, but in other
environments a user might want to include an image that exists in some
repository that requires authentication to pull.

The person building the image needs to provide
`--secret=id=instructlab-nvidia-pull/.dockerconfigjson,src=instructlab-nvidia-pull/.dockerconfigjson`
when building the image in order to make the secret available.

Signed-off-by: Ralph Bean <rbean@redhat.com>
2024-07-02 15:38:02 -04:00
Fabien Dupont 0548faf9b5 Update NVIDIA driver and CUDA in nvidia-bootc
For the InstructLab image, we use NVIDIA driver version `550.90.07` with
CUDA `12.4.1`, so this change updates the versions in the bootc image to
align the stack.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-07-02 08:52:44 -04:00
Daniel J Walsh aee1c80b7c
Merge pull request #652 from Gregory-Pereira/add-ai-lab-recipes-logo
adding logo to assets and readme
2024-07-02 05:40:23 -04:00
greg pereira f16215655f
adding logo to assets and readme
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-07-01 19:05:53 -07:00
Daniel J Walsh acc9a34ab0
Merge pull request #650 from cgwalters/workaround-link
Workaround hardlinked /etc changes
2024-07-01 05:55:16 -04:00
Colin Walters 0b5b374537 Workaround hardlinked /etc changes
This (not tested locally) change should work around
https://github.com/containers/bootc/issues/637

It's all tricky because you'll only again see this when using
the `vfs` backend. The `overlay` backend always breaks hardlinks.
For more, see e.g. https://github.com/ostreedev/ostree-rs-ext/pull/408

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-30 10:50:35 -04:00
Gregory Pereira 5875d908ea
Merge pull request #648 from containers/fixing-testing-framework
remove checkout with path so pathing is fixed
2024-06-27 18:21:24 -07:00
greg pereira a4bbf6cd55
remove checkout with path so pathing is fixed
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-27 18:20:23 -07:00
Daniel J Walsh 5462be9632
Merge pull request #634 from lstocchi/fixMakefile
fix: add build_vulkan commands for amd64/arm64 on Makefile
2024-06-27 14:45:04 -04:00
Daniel J Walsh aa0e2e4cd6
Merge pull request #642 from rhatdan/makefile
Primary training Makefile should not include common
2024-06-27 14:42:09 -04:00
Daniel J Walsh b1bd183b3f
Merge pull request #647 from rhatdan/bootc
Remove training images from ailab-images.md
2024-06-27 14:41:49 -04:00
Daniel J Walsh 71224cec78
Remove training images from ailab-images.md
We are not currently making these images available.

Fixes: https://github.com/containers/ai-lab-recipes/issues/643

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-27 12:01:27 -04:00
Gregory Pereira 624155c699
Merge pull request #646 from javipolo/fix_RUN_in_containerfiles
Remove comment from chained commands in RUN statement
2024-06-27 08:08:12 -07:00
Javi Polo 21c32e4e85
Remove comment from chained commands in RUN statement
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-27 16:26:16 +02:00
Dan Walsh d830a37cc0 Primary training Makefile should not include common
Along with some other cleanups.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-27 09:15:04 -04:00
Daniel J Walsh e8c3f16fee
Merge pull request #637 from javipolo/fix_dtk
Exclude kernel packages from dnf update
2024-06-27 08:47:50 -04:00
Daniel J Walsh e7a56081e0
Merge pull request #639 from n1hility/slim-models
Slim models to Granite LAB
2024-06-27 07:43:39 -04:00
lstocchi 379418666c
fix: add build_vulkan commands for amd64/arm64 on Makefile
Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-06-27 09:51:15 +02:00
Javi Polo 8a185aee61
Exclude kernel packages from dnf update
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-27 09:45:59 +02:00
Jason T. Greene 2b1ca94c31 Slim models to Granite LAB
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-06-27 02:29:37 -05:00
Daniel J Walsh ae4b4510c5
Merge pull request #638 from javipolo/fix_backslash
Add missing trailing backslash
2024-06-26 15:48:11 -04:00
Javi Polo fa60e10f40
Add missing trailing backslash
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-26 21:17:17 +02:00
Ryan Cook 629c3e59c7
Merge pull request #635 from enriquebelarte/add-check-dtk
Add check for installed kernel-core
2024-06-26 11:38:51 -04:00
Enrique Belarte Luque ff8b344bf9
Add check for installed kernel-core
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-26 10:30:33 -05:00
Daniel J Walsh 321653e3fd
Merge pull request #633 from n1hility/drop-cloud-targets
Drop cloud targets which were unintentionally resurrected
2024-06-26 10:12:15 -04:00
Jason T. Greene fef3d87459 Drop cloud targets which were unintentionally resurrected
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-06-26 08:34:16 -05:00
Gregory Pereira 3d2643048b
Merge pull request #611 from n1hility/model-improvements
Fix model targets and add additional improvements
2024-06-26 06:18:46 -07:00
Jason T. Greene b629739155 Fix model targets and add additional improvements
- Fix model download container and targets
- Add prometheus model for eval
- Improve caching in instructlab container
- Add additional "models" targets for all permutations
- Introduce build chaining so that you can build everthing in one step
- Small update to conform to $(MAKE) convention for submakes

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-06-26 08:13:18 -05:00
Daniel J Walsh 75e03f3def
Merge pull request #623 from containers/otel-trace-workflow
udpate otel-collector workflow config
2024-06-26 06:53:22 -04:00
Daniel J Walsh 85da91dfbf
Merge pull request #631 from javipolo/fix-model-targets
Fix model targets
2024-06-26 06:53:06 -04:00
Daniel J Walsh 98b01c6fb3
Merge pull request #632 from enriquebelarte/fix-amd-typo
Fix typo in Containerfile workaround
2024-06-26 06:51:32 -04:00
Enrique Belarte Luque e89f1d2219
Fix typo in Containerfile workaround
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-26 05:39:53 -05:00
Gregory Pereira 70c32cfd63
Merge pull request #630 from enriquebelarte/amd-selinux-tmp-fix
Temp workaround for amd-bootc
2024-06-25 11:15:55 -07:00
Enrique Belarte Luque 9409e63da4
Temp workaround for amd-bootc
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-25 13:11:50 -05:00
Javi Polo c290eb19d7
Force entrypoint when running generate-model-cfile
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-25 19:54:34 +02:00
Javi Polo 5245d5b008
Fix model-downloader container
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-25 19:54:27 +02:00
Daniel J Walsh ccc3cad081
Merge pull request #628 from javipolo/kernel-core-installed
Use --installed to get kernel version for packages to be installed
2024-06-25 13:53:52 -04:00
Daniel J Walsh a795bdaaaa
Merge pull request #629 from javipolo/cloud-init-default
Install and enable cloud-init by default
2024-06-25 13:52:26 -04:00
sallyom d45439bf2e debug workflows otel trace
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-25 12:17:35 -04:00
Javi Polo e0dba4476e
Install and enable cloud-init by default
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-25 17:16:25 +02:00
Javi Polo 03a385833f
Use --installed to get kernel version for packages to be installed
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-25 16:58:46 +02:00
Ryan Cook 236bc2e823
Merge pull request #627 from containers/ami
ami switch for nvidia
2024-06-25 09:26:39 -04:00
Ryan Cook 035d4adc67 ami switch for nvidia
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-25 09:25:37 -04:00
Ryan Cook ee1acc7fa1
Merge pull request #626 from containers/wait_nvidia
wait until the nvidia bootc tasks is complete before deletion
2024-06-25 08:30:57 -04:00
Ryan Cook 06e2b4ae65 wait until the nvidia bootc tasks is complete before deletion
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-25 08:30:35 -04:00
Daniel J Walsh 85f4b865b5
Merge pull request #624 from enriquebelarte/oci-mount-fix-konflux
Add changes to podman oci mount
2024-06-25 08:12:13 -04:00
Enrique Belarte Luque 98c03d6760
Add changes to podman oci mount
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-25 06:33:45 -05:00
Daniel J Walsh cabac566a5
Merge pull request #625 from javipolo/osbuild-selinux-note
Add note about osbuild-selinux required to build disk images
2024-06-25 07:25:47 -04:00
Enrique Belarte Luque a9f888e607
Add changes to podman oci mount
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-25 05:03:50 -05:00
Javi Polo 3db000141e
Add note about osbuild-selinux required to build disk images
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-25 11:32:36 +02:00
Enrique Belarte Luque cb4cd25ab6
Add changes to podman oci mount
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-25 04:15:04 -05:00
sallyom e6f4a7430f update tracegen script
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-24 23:48:39 -04:00
sallyom 81922dec29 udpate otel-collector workflow config
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-24 22:55:17 -04:00
Ryan Cook 5e418481df
Merge pull request #622 from containers/when_run
need to provide nvidia with oci artifacts
2024-06-24 17:48:54 -04:00
Ryan Cook e967ee1700 need to provide nvidia with oci artifacts
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-24 16:49:22 -04:00
Ryan Cook 50a058dacc
Merge pull request #621 from containers/when_run
need to set the arch for instructlab image
2024-06-24 16:10:09 -04:00
Ryan Cook 9eb0d5f3cd need to set the arch for instructlab image
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-24 16:09:45 -04:00
Daniel J Walsh 9585310997
Merge pull request #616 from rhatdan/bootc
Make output a subdir of build, to allow chown to work
2024-06-24 15:17:23 -04:00
Ryan Cook a356198117
Merge pull request #620 from containers/when_run
fixes of image tagging
2024-06-24 15:04:01 -04:00
Ryan Cook a5399bdda7 fixes of image tagging
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-24 15:03:16 -04:00
Ryan Cook c2c7576493
Merge pull request #619 from containers/when_run
when to run the testing
2024-06-24 14:47:05 -04:00
Ryan Cook e28d1ff453 when to run the testing
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-24 14:46:29 -04:00
Ryan Cook 27d3d80201
Merge pull request #618 from containers/needs_fix
needs runner information
2024-06-24 14:26:12 -04:00
Gregory Pereira 6d7ffa737b
Merge pull request #615 from rhatdan/makefile
Must lowercase the IMAGE name
2024-06-24 11:09:25 -07:00
Ryan Cook 72ebe7cb32 needs runner information
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-24 13:26:19 -04:00
Daniel J Walsh bc863008d2
Merge pull request #610 from containers/renovate/auto-merged-updates
Update Auto merged updates
2024-06-24 12:53:29 -04:00
Daniel J Walsh b1dd1cb9e6
Merge pull request #614 from containers/run-bootc-builds-on-non-mirror
moving tests from mirror to regular
2024-06-24 12:52:44 -04:00
Ryan Cook ac557caf52 for some reason the intel test needs this image or it will fail
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-24 12:33:52 -04:00
Gregory Pereira 2707f87fd2
Merge pull request #617 from enriquebelarte/fix-ilab
Fix ilab
2024-06-24 09:05:17 -07:00
Enrique Belarte Luque 8c43552fd6
Syntax fix
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 10:57:48 -05:00
Platform Engineering Bot 2061db5fa0 Update Auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-06-24 15:44:15 +00:00
Dan Walsh ee81fafaa7 Make output a subdir of build, to allow chown to work
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-24 11:41:34 -04:00
Dan Walsh 735d7ab0be Must lowercase the IMAGE name
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-24 11:36:35 -04:00
Enrique Belarte Luque 21dd1a23ca
Syntax fix
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 10:17:01 -05:00
greg pereira f0a607271b
moving tests from mirror to regular
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-24 06:26:39 -07:00
Gregory Pereira a012c67270
Merge pull request #613 from containers/fix-bootc-build-workflow-stop
fixing aws region on tf stop
2024-06-24 06:18:28 -07:00
Daniel J Walsh 23b70bf156
Merge pull request #612 from enriquebelarte/fix-ilab-script
Workaround for ilab script source
2024-06-24 09:16:20 -04:00
greg pereira f7238fb9e5
fixing aws region on tf stop
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-24 06:15:27 -07:00
Daniel J Walsh 61d6bb1851
Merge pull request #598 from prarit/fix-amd-target
training/Makefile: Fix top level vendor targets
2024-06-24 09:14:16 -04:00
Daniel J Walsh e36d53ef8b
Merge pull request #607 from containers/otel-trace-workflow
Otel trace workflow
2024-06-24 09:13:12 -04:00
greg pereira 5877759317
triggering bootc builds
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-24 06:06:58 -07:00
Enrique Belarte Luque 12c2e6dae9
Workaround for ilab script source
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 07:58:39 -05:00
Enrique Belarte Luque bdec51299a
Workaround for ilab script source
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 07:42:16 -05:00
Enrique Belarte Luque d084de4faa
Workaround for ilab script source
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 07:14:47 -05:00
Enrique Belarte Luque 74de44f3aa
Workaround for ilab script source
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 04:30:07 -05:00
Enrique Belarte Luque 786b221bdd
Workaround for ilab script source
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-24 04:19:55 -05:00
Gregory Pereira e75e1856d8
Merge pull request #608 from containers/fix-deter-resnet-ms
allowing pip to install requirements
2024-06-23 17:59:33 -07:00
Ryan Cook 261d5e60d3
Merge pull request #609 from containers/self_hosted_runner
self hosted runner capabilties
2024-06-23 20:58:30 -04:00
Ryan Cook d94c373611 self hosted runner capabilties
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-23 20:45:06 -04:00
greg pereira 60eb979527
allowing pip to install requirements
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-23 17:39:04 -07:00
sallyom 4e36394c17 another try
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-23 01:35:27 -04:00
sallyom 1f0f1f9ca6 update workflow
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-22 23:02:14 -04:00
Daniel J Walsh 330df095f8
Merge pull request #602 from axel7083/feature/support-hf-pretrained-model
feat: adding support for hf_pretrained_model option
2024-06-22 08:23:26 -04:00
Jason T. Greene 40e1538c08
Merge pull request #606 from n1hility/revert-599
Revert "Change source from ilab wrapper"
2024-06-22 02:02:43 -05:00
Jason T. Greene bf965d38e2 Revert "Change source from ilab wrapper"
This reverts commit 528ae444c0.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-06-22 02:00:27 -05:00
Gregory Pereira 82bcb8cf91
Merge pull request #599 from enriquebelarte/change-ilab-wrapper 2024-06-21 19:12:07 -07:00
Jason T. Greene f7f69635ec
Merge pull request #596 from containers/top-level-bootc-with-images
Top level bootc with images
2024-06-21 20:26:42 -05:00
Gregory Pereira 322ebc4562
Merge pull request #605 from containers/network_tool
netavark tool required
2024-06-21 13:30:07 -07:00
Ryan Cook 13aa5dce20 netavark tool required
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-21 16:19:01 -04:00
Ryan Cook c6c55a3a43
Merge pull request #604 from containers/nvidia_key
get through testing and allow for users to inject their own key with …
2024-06-21 15:41:18 -04:00
Ryan Cook 9b39f6f81d get through testing and allow for users to inject their own key with this image
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-21 15:37:33 -04:00
Ryan Cook 9f3fda19ba
Merge pull request #603 from cooktheryan/bring_podman
Bring your own podman 5
2024-06-21 15:08:40 -04:00
Ryan Cook 816eb2f112 Bring your own podman 5
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-21 14:01:08 -04:00
greg pereira 0d4249d732
refactor for consistency
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-21 09:04:08 -07:00
axel7083 1f1125a745
feat: adding support for hf_pretrained_model option
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-06-21 17:11:56 +02:00
greg pereira 52fb03a868
refactor model to work with env variable + absolute paths
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-21 06:45:12 -07:00
greg pereira 4edf5f594e
add HF token as ENV var + check if exists
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-21 06:45:12 -07:00
Gregory Pereira 452795eaa9
Merge pull request #600 from containers/create-new-bootc-variant-with-models-targets
adding new top level variant bootc + models targets
2024-06-21 06:44:16 -07:00
greg pereira d55ec98168
adding new top level variant bootc + models targets
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-21 06:43:19 -07:00
Enrique Belarte Luque 528ae444c0
Change source from ilab wrapper
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-21 08:43:05 -05:00
Prarit Bhargava 5e492cae4a training/Makefile: Fix top level vendor targets
The top level vendor targets (amd, intel, nvidia) fail with

"podman" build \
	 \
	--file /root/ai-lab-recipes/training/model/../build/Containerfile.models \
	--security-opt label=disable \
	--tag "quay.io/ai-lab/-bootc-models:latest" \
	-v /root/ai-lab-recipes/training/model/../build:/run/.input:ro
Error: tag quay.io/ai-lab/-bootc-models:latest: invalid reference format
make[1]: *** [Makefile:41: bootc-models] Error 125
make[1]: Leaving directory '/root/ai-lab-recipes/training/model'
make: *** [Makefile:70: bootc-models] Error 2

because VENDOR is not defined when the bootc-models target is called.

Modify the makefile to set VENDOR for each target.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
2024-06-21 08:19:38 -04:00
sallyom dc012ed809 debug curl
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-20 19:00:44 -04:00
Daniel J Walsh 5ff1da8d80
Merge pull request #595 from containers/bump-standard-runners
bump std runners from 22.04 to 24.04
2024-06-20 16:41:14 -04:00
Daniel J Walsh 5f0505e3e0
Merge pull request #594 from rhatdan/makefile
Fix up pulling images
2024-06-20 16:40:13 -04:00
greg pereira abe7c2129d
fixing dependency versions for model servers
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-20 13:18:55 -07:00
greg pereira 07cbb1dd99
bump std runners from 22.04 to 24.04
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-20 13:03:33 -07:00
Dan Walsh 7cf692b26b Fix up pulling images
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-20 15:54:09 -04:00
Daniel J Walsh 0e149be067
Merge pull request #588 from rhatdan/makefile
Fix instruct-intel target
2024-06-20 15:30:27 -04:00
Dan Walsh f3a58f292f fix instruct-intel target
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-20 13:20:41 -04:00
Daniel J Walsh f47422e93f
Merge pull request #591 from rhatdan/vllm
No longer using vllm and deepspeed images for AI bootc images
2024-06-20 12:03:16 -04:00
Daniel J Walsh aa7b8b8c8d
Merge pull request #589 from rhatdan/growfs
Eliminate growfs from training containers
2024-06-20 11:54:25 -04:00
Daniel J Walsh 04c70593a7
Merge pull request #590 from javipolo/osbuild-fix-order
Fix image builder
2024-06-20 11:54:09 -04:00
Dan Walsh daf4b634ef No longer using vllm and deepspeed images for AI bootc images
Instructlab will include these executables inside of its container
rather then using external containers.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-20 11:50:15 -04:00
Javi Polo 1f869bfbcb
Fix image builder
- Properly separate and order podman and bootc-image-builder arguments
- Move all the `selinux.tmp` workaround to the same layer, so bootc
  install wont complain about missing files

Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-20 17:41:37 +02:00
Dan Walsh 5e4e74a4a9 Eliminate growfs from training containers
Training images will not be installed in the cloud by default so should
not include growfs.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-20 11:40:37 -04:00
Daniel J Walsh 84c8acd656
Merge pull request #584 from javipolo/ilab_use_variables
Allow custom instructlab image url via env variables
2024-06-20 11:19:37 -04:00
Daniel J Walsh a44d59b3f0
Merge pull request #587 from tiran/gaudi-comment
Add note about Gaudi updates
2024-06-20 11:17:50 -04:00
Gregory Pereira 13b721d088
Merge pull request #586 from containers/nvidia-builder-to-builer
move bootc builder (dtk) to common
2024-06-20 06:59:43 -07:00
Christian Heimes 931c14a3ed Add note about Gaudi updates
Any Gaudi update must be synchronized with all stakeholders. For now,
all packages from Kernel OOT drivers over firmware and SynapseAI to
PyTorch stack must have the same version. `habana-torch-plugin` version
`1.16.0.526` does not work with Kernel drivers `1.16.1-7`.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
2024-06-20 13:05:04 +02:00
sallyom 3af8da0522 mTLS & configure otel-collector to ROSA-ET
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-19 22:47:24 -04:00
sallyom 6a72550c6e add traces to chatbot workflow
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-19 21:45:34 -04:00
sallyom 0a27f9f80c fix indent
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-19 21:45:34 -04:00
sallyom 8089c22281 update workflow triggers
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-19 21:45:34 -04:00
sallyom f37bebeeba add traces to testing_framework
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-19 21:45:34 -04:00
sallyom 4792aa172e test workflow with otel traces
Signed-off-by: sallyom <somalley@redhat.com>
2024-06-19 21:45:34 -04:00
greg pereira 36f3a9a406
rename dir
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-19 15:08:10 -07:00
greg pereira 8b6f702f43
move bootc builder to common
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-19 14:35:58 -07:00
Javi Polo 2d185795ac
Allow custom instructlab image url via env variables
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-06-19 22:49:41 +02:00
Gregory Pereira fcd7e7a7e1
Merge pull request #585 from fabiendupont/bootc-intel-multistage
Use multi-stage to build the Intel bootc image
2024-06-19 12:53:55 -07:00
Fabien Dupont 744a03e18c Use multi-stage to build the Intel bootc image
The NVIDIA bootc container is using multi-stage to avoid shipping build
dependencies in the final image, making it also smaller. This change
implements the same build strategy for the Intel bootc image.

The builder image is the same as for NVIDIA bootc. It is currently named
after NVIDIA, but should be renamed in a follow-up change. The benefit
is that a single builder image is maintained for all bootc images that
require out-of-tree drivers.

The number of build arguments is also reduced, since most of the
information is already present in the builder image. There is only one
kernel package per builder image and one image per architecture, so we
can retrieve the `KERNEL_VERSION` and `TARGET_ARCH` variables by
querying the RPM database. The OS information is retrieved by sourcing
the `/etc/os-release` file.

The extraction of the RPMs doesn't require storing the files, as
`rpm2cpio` supports streaming the file over HTTP(S). This number of
commands is smaller and the downloads happened already for each build,
since the download was not in a separate `RUN` statement.

It is not necessary to copy the source of the drivers in `/usr/src\, since
we don't need to keep it in the final image. The Makefiles accept a
`KVERSION` variable to specify the version of the kernel and resolve its
path. The other benefit is to build as non-root.

The `.ko` files can then be copied to the final image with `COPY
--from=builder`. The change also ensures that the firmware files are
copied to the final image.

This change also adds support for `EXTRA_RPM_PACKAGES`.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-06-19 13:00:12 -04:00
Jason T. Greene cb8cc3c08d
Merge pull request #583 from n1hility/add-images
Adds models to bootc-models image
2024-06-19 11:37:46 -05:00
Jason T. Greene ef9b838041 Fix build issues and add models to new bootc image
- Fix wrong script install (container lab used over wrapper [wont run on its own])
  + Restores elements that were unintentionally removed
- Fix quay tags
- Introduce "$ARCH-bootc-models" images in addition to bootc that include models

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-06-19 04:17:19 -05:00
Gregory Pereira ab7465198d
Merge pull request #581 from containers/gpu
wrong var used new var introduced
2024-06-18 13:41:55 -07:00
Ryan Cook 806c11fec6 wrong var used new var introduced
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-18 16:37:12 -04:00
Ryan Cook 86d74b7705
Merge pull request #579 from containers/oci_art
need to bring in oci artifacts to build
2024-06-18 16:13:25 -04:00
Ryan Cook 00cdd48758 need to bring in oci artifacts to build
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-18 16:11:36 -04:00
Gregory Pereira 41a8bed497
Merge pull request #578 from containers/amd_fix
WIP: resolve build issues with bootc and amd
2024-06-18 12:32:57 -07:00
Ryan Cook f25197f7a8 allow for images to built and pushed to quay
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-18 15:29:01 -04:00
Ryan Cook ed5d7bb3e6 resolve build issues with bootc and amd
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-18 15:14:28 -04:00
Daniel J Walsh c95e9441e2
Merge pull request #570 from tiran/gaudi-1.16.0
Update Intel Gaudi to 1.16.0-526
2024-06-18 02:50:42 -04:00
Daniel J Walsh 302025027a
Merge pull request #571 from enriquebelarte/fix-intel
Fixes and improvements for Intel Containerfile
2024-06-18 02:50:03 -04:00
Daniel J Walsh 07997a72f9
Merge pull request #569 from containers/renovate/auto-merged-updates
Update Auto merged updates
2024-06-18 02:48:08 -04:00
Gregory Pereira cfde0b9d7e
Merge pull request #572 from enriquebelarte/conditional-growfs
Make growfs conditional
2024-06-17 21:28:14 -07:00
Platform Engineering Bot 9a6f9b2ce7 Update Auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-06-18 00:55:51 +00:00
Ryan Cook 5937d032ca
Merge pull request #573 from containers/typo
typo in server
2024-06-17 13:48:32 -04:00
Ryan Cook a1dbf9f6f7 typo in server
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-17 08:53:54 -04:00
Enrique Belarte Luque 3b7a78bcde
Make growfs conditional
growfs is created by Makefile and CI does not use it. Also if I'm not misktaken growfs is only used for disk images creation.
By changing this, growfs file will only be created when Makefile is runningso CI pipelines can build the Containerfile and growfs can be also used when needed.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-17 06:07:11 -05:00
Enrique Belarte Luque 39705e10f7
Fixes and improvements for Intel Containerfile
As per suggestions of @rhdatan some improvements made

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-17 02:41:04 -05:00
Christian Heimes ef3206bab3 Update Intel Gaudi to 1.16.0-526
Signed-off-by: Christian Heimes <cheimes@redhat.com>
2024-06-17 08:02:40 +02:00
Daniel J Walsh 7b1d2f9fac
Merge pull request #544 from rhatdan/build
Add support for BUILD_ARG_FILE
2024-06-14 20:49:14 -04:00
Daniel J Walsh b910e23cc9
Merge pull request #548 from containers/fix_chat
specify community package
2024-06-14 20:48:28 -04:00
Daniel J Walsh 0a6fab60a9
Merge pull request #564 from enriquebelarte/intel-nodkms
Remove DKMS from Intel drivers
2024-06-14 20:48:08 -04:00
Daniel J Walsh 86e4d0f5ed
Merge pull request #563 from enriquebelarte/add-base-arg
Add BASEIMAGE variable
2024-06-14 20:41:58 -04:00
Ryan Cook 52f75d3f28
Merge pull request #565 from containers/fix-llamacpp-default-chat-format
temp fix revert to llama-2 format by default
2024-06-14 17:13:52 -04:00
greg pereira a40bd357b7
temp fix revert to llama-2 format by default
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-14 13:50:54 -07:00
Ryan Cook a15d20ce0b test based on changes to requirements file or renovate
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-14 15:30:25 -04:00
Enrique Belarte Luque ddc7844af2
Fix harcoded kernel version
Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-14 07:28:42 -05:00
Enrique Belarte Luque 17187146b0
Remove DKMS from Intel drivers
To avoid the use of DKMS rpms are downloaded and then sources extracted and compiled.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-14 07:23:41 -05:00
Enrique Belarte Luque d6459526c7
Add BASEIMAGE variable
Adding BASEIMAGE to Containerfile.builder allows using different images for building

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-14 05:03:28 -05:00
Ryan Cook 137197b134
Merge pull request #557 from fabiendupont/add-tmux-to-bootc-image
Add tmux to the bootc image
2024-06-13 11:23:37 -04:00
Ryan Cook 948f303724
Merge pull request #559 from enriquebelarte/temp-fix-libdnf
Temporary fix for bootc CI builds
2024-06-13 11:15:00 -04:00
Ryan Cook 5e902faeba
Merge pull request #558 from fabiendupont/fix-typo-for-pciutils
Fix typo for pciutils in AMD bootc
2024-06-13 10:50:39 -04:00
Enrique Belarte Luque 3e3fbdaa12
Temporary fix for bootc CI builds
Konflux CI fails when building using bootc images as base throwing this error:
`Error: Cannot create repo temporary directory "/var/cache/dnf/baseos-044cae74d71fe9ea/libdnf.1jsyRp": Permission denied`
This temporary workaround is needed for build pipeline to work on Konflux CI until libdnf fix is merged to RHEL.

References:
https://issues.redhat.com/browse/RHEL-39796
https://github.com/rpm-software-management/libdnf/pull/1665

This should be removed once the permanent fix is merged.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-06-13 07:10:21 -05:00
Fabien Dupont a364524f73 Fix typo for pciutils in AMD bootc
Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-06-13 05:26:45 -04:00
Fabien Dupont 3991cb4123 Add tmux to the bootc image
Many commands that are run for SDG and training can take a lot of time,
so there is a risk to have a network disconnection during the task. With
`tmux`, users have the ability to detach the jobs from their SSH session
and let the tasks run for a very long time.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-06-13 03:55:42 -04:00
Daniel J Walsh 295a57c114
Merge pull request #555 from fabiendupont/add-pciutils-to-bootc-image
Add pciutils to the OS image
2024-06-12 13:01:06 -04:00
Ryan Cook 4890129d3c
Merge pull request #556 from containers/debug_pull
ansible -vvv is not helpful at this time
2024-06-12 12:40:08 -04:00
Ryan Cook 1ee2a72dfd ansible -vvv is not helpful at this time
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-12 12:39:32 -04:00
Daniel J Walsh 178f2c18c9
Merge pull request #550 from rhatdan/nvidia
Make more options optional
2024-06-12 11:44:15 -04:00
Fabien Dupont 21f12b7e5a Add pciutils to the OS image
The `lspci` command is frequently used to inspect the hardware on a
server. Adding it to the OS image would help users to troubleshoot
deployment and configuration issues.

Signed-off-by: Fabien Dupont <fdupont@redhat.com>
2024-06-12 11:23:24 -04:00
Ryan Cook 7e17de44a6
Merge pull request #554 from containers/debug_pull
init ilab before pull
2024-06-12 10:48:41 -04:00
Ryan Cook dadf808d87 init ilab before pull
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-12 10:47:55 -04:00
Ryan Cook cf2b01e67e
Merge pull request #552 from containers/debug_pull
attempting to pull model manually w ilab
2024-06-12 10:14:11 -04:00
Ryan Cook a2a3472913 attempting to pull model manually
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-12 10:13:19 -04:00
Ryan Cook bf845b9b08
Merge pull request #551 from containers/rollback_reboot
rollback
2024-06-11 15:20:00 -04:00
Ryan Cook 9b04792113 rollback
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 15:19:30 -04:00
Daniel J Walsh 24b4bbc414
Merge pull request #549 from containers/hacking_e2e_fix
trying to pass runtime var to allow for model pull
2024-06-11 14:35:47 -04:00
Ryan Cook 45dc5dd0fc roll back tag
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 14:35:09 -04:00
Daniel J Walsh 7f0793570e
Make more options optional
Remove unused _ID directives.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-11 14:23:12 -04:00
Ryan Cook 643fd9910e remove message?
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 14:22:16 -04:00
Daniel J Walsh 5c923329b9
Merge pull request #545 from rhatdan/squash
podman build does not support --squash and --layers at same time
2024-06-11 13:57:17 -04:00
Ryan Cook bf3be8317d must make this faster
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 13:45:43 -04:00
Ryan Cook 4911ad30d5 further testing
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 12:59:03 -04:00
Daniel J Walsh 1704a5ab94
podman build does not support --squash and --layers at same time
Fixed: https://github.com/containers/podman/pull/22957

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-11 12:55:12 -04:00
Ryan Cook 18d8e8183c trying to pass runtime var to allow for model pull
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 12:19:08 -04:00
Ryan Cook 9a6e26fad7 changes based on feedback
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 12:06:30 -04:00
Ryan Cook ce2b0413d7 specify community package
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-11 09:24:48 -04:00
Daniel J Walsh f90a88cda6
Merge pull request #539 from containers/default-chat-template-to-model-meta
defaulting no option but allow override chat format
2024-06-10 13:28:32 -04:00
Daniel J Walsh cb742bb0c1
Add support for BUILD_ARG_FILE
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-10 13:26:37 -04:00
greg pereira 558ecafd2c
removing empty default option in containerfile
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-10 08:59:34 -07:00
Gregory Pereira c516758948
Merge pull request #543 from containers/renovate_bot
try to fix the renovate bot from breaking milvus
2024-06-10 08:53:44 -07:00
Ryan Cook d0e775eb9a Better patch version
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-10 10:28:30 -04:00
Ryan Cook 3584681985 try to fix the renovate bot from breaking milvus
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-10 10:28:30 -04:00
Daniel J Walsh e46a5105ed
Merge pull request #542 from rhatdan/build
Fix Makefiles to allow alternative container engines
2024-06-10 08:29:59 -04:00
Daniel J Walsh ef79d65a0d
Fix Makefiles to allow alternative container engines
Some users want to use buildah instead of podman to build
their container engines.

Buildah does not support --squash-all but after examining the podman
code --squash-all ends up just being the equivalent of "--squash --layers=false"

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-09 07:50:34 -04:00
Daniel J Walsh 45cebdb961
Merge pull request #534 from rhatdan/makefile
Improve Makefiles
2024-06-09 07:46:29 -04:00
Gregory Pereira 62abb1711f
Merge pull request #541 from containers/llamacpp-python-vulkan-amd64
Llamacpp python vulkan amd64
2024-06-08 14:39:25 -07:00
greg pereira 65f265af07
defaulting no option but allow override chat format
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-08 14:26:53 -07:00
greg pereira 59e9cd6a8c
workflow and corresponding dir structure
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-08 14:25:57 -07:00
greg pereira 21d641d308
vulkan amd64 build
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-08 09:06:35 -07:00
Gregory Pereira 9b686a3df2
Merge pull request #537 from cooktheryan/unbreak
fixes break that was introduced
2024-06-08 07:16:02 -07:00
greg pereira 3bd1e38524
vulkan uses GPUs, workflow should run with GPU
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-08 07:01:40 -07:00
Ryan Cook 7e27567860 fixes break that was introduced
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-07 10:29:54 -04:00
Ryan Cook e959cd408d
Merge pull request #528 from containers/llamacpp-python-vulkan-arm64
lamacpp-python-vulkan for arm64
2024-06-07 09:34:06 -04:00
greg pereira 30bee42e16
lamacpp-python-vulkan for arm64
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-06 20:18:19 -07:00
Daniel J Walsh 9b611c4810
Merge pull request #535 from cooktheryan/epel
fix of broken install
2024-06-06 16:40:52 -04:00
Ryan Cook af6ae97853 fix of broken install
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-06 15:50:32 -04:00
Dan Walsh a0d528f140 Add support for SOURCE_DATE_EPOCH
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-06 15:25:47 -04:00
Dan Walsh 925ca1e8cb Sort build options
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-06 15:18:49 -04:00
Dan Walsh ab744c9700 Improve Makefiles
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2024-06-06 15:17:52 -04:00
Gregory Pereira eb011f3288
Merge pull request #532 from containers/revert-517-bump-all-python-base-images-to-312
Revert "bump python 3.11 to 3.12"
2024-06-06 09:04:11 -07:00
Gregory Pereira 8cb48bff41
Merge pull request #533 from cooktheryan/pin_version
need to pin version specific version of fedora
2024-06-06 08:22:09 -07:00
Ryan Cook 77739abad7 need to pin version specific version of fedora
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-06 11:06:31 -04:00
Gregory Pereira 44e4c70487
Revert "bump python 3.11 to 3.12"
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-06 08:05:40 -07:00
Daniel J Walsh 4cb9a41f0c
Merge pull request #517 from containers/bump-all-python-base-images-to-312
bump python 3.11 to 3.12
2024-06-05 20:12:52 -04:00
greg pereira 5dd5a5776c
bump python 3.11 to 3.12
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-05 13:46:54 -07:00
Daniel J Walsh 0dd18c34e5
Merge pull request #531 from containers/fix-chat-format-llamacpp
fix passing of chat_format to llamacpp ms
2024-06-05 16:27:03 -04:00
greg pereira 246912c61e
fix passing of chat_format to llamacpp ms
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-06-05 12:51:58 -07:00
Daniel J Walsh bd40fa9daa
Merge pull request #529 from cooktheryan/arm_fail
fix of arm err on previous run
2024-06-03 14:52:47 -04:00
Ryan Cook 462b22991c fix of arm err
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-06-03 14:17:27 -04:00
Daniel J Walsh a2f7761627
Merge pull request #518 from MichaelClifford/promptfoo
Add initial tool for creating custom eval sets
2024-06-03 11:46:08 -04:00
Daniel J Walsh 4471de3063
Merge pull request #519 from johnmcollier/configuremodel
Configure model for chatbot and codegen recipes
2024-06-03 11:44:52 -04:00
Daniel J Walsh b1823979b4
Merge pull request #521 from cooktheryan/renvoate
bump renovate
2024-06-01 07:03:04 -04:00
Gregory Pereira a4251c3967
Merge pull request #523 from containers/e2e-max-concurrency-1
adding single concurrency value to e2e
2024-05-31 13:28:41 -07:00
greg pereira a50b244757
adding single concurrency value to e2e
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-31 13:19:00 -07:00
Ryan Cook 60a7d60b4a bump renovate
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-05-31 15:37:37 -04:00
John Collier c25aac807d Configure model for chatbot and codegen recipes
Signed-off-by: John Collier <jcollier@redhat.com>
2024-05-31 12:14:53 -04:00
Michael Clifford 59d6e2caff add initial tool for creating custom eval sets
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-30 17:18:35 -04:00
Gregory Pereira 66c6a52307
Merge pull request #515 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-05-29 10:21:35 -07:00
greg pereira 7d94e22361
bump python to 3.12 version in containerfile
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-29 09:32:59 -07:00
Platform Engineering Bot dc0fba38a8 chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-05-29 08:55:15 +00:00
Daniel J Walsh 5fd2597aa9
Merge pull request #510 from gcolman/patch-1
Fix invalid instructions in README.md
2024-05-27 06:57:36 -04:00
Graeme Colman 2573e7d148 Fix invalid instructions in README.md
Fixed two instructions in the README.
1) the instruction to make model pointed to etr-resnet-50 rather than the etr-resnet-101 that the instructions use.
2) The client container start had a /detecion in the model address where it should not have.
added signoff

Signed-off-by: Graeme Colman <gcolman@redhat.com>
2024-05-26 12:55:18 +01:00
Daniel J Walsh 0dad0b5c4b
Merge pull request #508 from MichaelClifford/promptfoo
initial promptfoo commit
2024-05-25 06:30:41 -04:00
Daniel J Walsh 96f9181ec0
Merge pull request #512 from markmc/makefile-cleanup
Remove unused instructlab Makefile variables
2024-05-25 06:26:52 -04:00
Daniel J Walsh b7fdd642f8
Merge pull request #513 from markmc/gpu-count-check
ilab-wrapper: fix GPU_AMOUNT check
2024-05-25 06:26:10 -04:00
Mark McLoughlin 29759fce40 ilab-wrapper: fix GPU_AMOUNT check
No need to emit this warning on a 2x GPU system.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2024-05-23 14:58:54 -04:00
Mark McLoughlin 2be14b67ff Remove unused instructlab Makefile variables
Unused since #427 - commit 6a42054

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2024-05-23 13:44:52 -04:00
Liora Milbaum 3d5a294816
Merge pull request #511 from enriquebelarte/intel-ci
Simplify package installation
2024-05-23 17:01:13 +03:00
Enrique Belarte Luque c42d2a2265
Simplify package installation
Installs epel and CRB in a cleaner way.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-05-23 08:40:54 -05:00
Michael Clifford d8b4669671 Update eval/promptfoo/base/Containerfile
Co-authored-by: Gregory Pereira <grpereir@redhat.com>
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-22 18:36:18 -04:00
Daniel J Walsh 873184271d
Merge pull request #506 from enriquebelarte/bootc-baseimages
Add BASEIMAGE as argument to Containerfile
2024-05-22 17:35:28 -04:00
Michael Clifford 027c96075d initial promptfoo commit
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-22 16:40:59 -04:00
Jeff MAURY 9939d3bca8
fix: object_detection recipes error in Podman AI Lab (#505)
Fixes #504

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-05-22 09:28:26 -04:00
Enrique Belarte Luque a2bdde936a
Add BASEIMAGE as argument to Containerfile
Added BASEIMAGE as ARG so it can be used from build.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-05-22 07:27:16 -05:00
Gregory Pereira 70c990bc21
Merge pull request #502 from containers/downgrade-langchain-in-nlp-recipes
downgrade langchain to < 0.2.0 in nlp recipes
2024-05-21 10:09:51 -07:00
greg pereira 197d0fd2e0
downgrade langchain to < 0.2.0 in nlp recipes
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-21 10:08:18 -07:00
Liora Milbaum 4ba23af406
Merge pull request #501 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-05-20 11:37:15 +03:00
Platform Engineering Bot 9749b5a2ed chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-05-20 00:13:31 +00:00
Jeff MAURY d25371d390
fix: prevent multipes requests in chatbot recipe (#498)
Fixes #497

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
2024-05-17 09:05:43 -04:00
Liora Milbaum 484d7f888c
Merge pull request #499 from lmilbaum/renovate-config
Renovate config
2024-05-17 15:16:35 +03:00
Liora Milbaum 1aadad326b Renovate config
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-17 15:16:04 +03:00
Daniel J Walsh 1bde81f7b1
Merge pull request #496 from MichaelClifford/fix-486
update readme's to clarify app ports used
2024-05-16 17:30:58 -04:00
Michael Clifford 90faadfa0d update readme's to clarify app ports used
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-16 17:11:10 -04:00
Daniel J Walsh ae88cd7beb
Merge pull request #334 from Shreyanand/milvus
Add Milvus database compatibility with the RAG recipe
2024-05-16 14:25:36 -04:00
Shrey ef4b6f0109
Update .github/workflows/rag.yaml
Co-authored-by: Gregory Pereira <grpereir@redhat.com>

Update recipes/natural_language_processing/rag/app/rag_app.py

Co-authored-by: Gregory Pereira <grpereir@redhat.com>

Update Readme and add review comments

Signed-off-by: Shreyanand <shanand@redhat.com>
2024-05-16 12:52:07 -04:00
Michael Clifford 0df104daee
lower ConversationBufferWindowMemory (#495)
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-15 18:51:35 -04:00
Michael Clifford 50a79740c1
add interrupt to llamacpp (#494)
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-15 18:51:06 -04:00
Gregory Pereira bae8b153b5
object detection recipe and MS tests (#278)
* object detection recipe and MS tests

Signed-off-by: greg pereira <grpereir@redhat.com>
Signed-off-by: Gregory-Pereira <grpereir@redhat.com>
Signed-off-by: greg pereira <grpereir@redhat.com>

* adding a object_detection_client workflow file

Signed-off-by: greg pereira <grpereir@redhat.com>

* addressing michael's comments

Signed-off-by: greg pereira <grpereir@redhat.com>

* properly name object detection client job + moving pip install to tests

Signed-off-by: greg pereira <grpereir@redhat.com>

---------

Signed-off-by: greg pereira <grpereir@redhat.com>
Signed-off-by: Gregory-Pereira <grpereir@redhat.com>
2024-05-14 13:54:58 -04:00
Liora Milbaum 9107f0cd35
Merge pull request #492 from containers/renovate/auto-merged-updates
Update Auto merged updates
2024-05-13 21:46:41 +03:00
redhat-renovate-bot 6d05f9ab12 Update Auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-05-13 02:07:36 +02:00
Liora Milbaum 2df4681cdc
Merge pull request #490 from enriquebelarte/intel-bc
Install habanalabs packages in containerfile
2024-05-09 18:59:45 +03:00
Enrique Belarte Luque ec05b07b17
Install habanalabs packages in containerfile
Added packages and dependencies to habanalabs and Gaudi support.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-05-09 10:41:36 -05:00
Daniel J Walsh 35a75a6588
Merge pull request #489 from rhatdan/intel
Turn on instructlab for intel
2024-05-09 09:52:28 -04:00
Daniel J Walsh bf1158b6bf
Merge pull request #474 from rhatdan/instructlab
Error on umasks other then 022
2024-05-09 08:10:03 -04:00
Daniel J Walsh 3a79f37888
Merge pull request #470 from javipolo/bootc-image-builder-toml
Allow both json and toml as config files for bootc-image-builder
2024-05-09 08:09:17 -04:00
Daniel J Walsh 37e7bb686f
Merge pull request #488 from javipolo/newer-kernel-core
Use newer kernel version when there are multiple available
2024-05-09 08:07:16 -04:00
Daniel J Walsh b6e0feb72e
Turn on instructlab for intel
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-09 06:04:47 -06:00
Javi Polo 2fa420ac7c
Use newer kernel version when there are multiple available
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-05-09 11:54:45 +02:00
Liora Milbaum dbcdc38326 trainig_bootc workflow 2024-05-07 20:34:09 +03:00
Liora Milbaum 6fffb5e2b7 trainig_bootc workflow 2024-05-07 20:06:59 +03:00
Liora Milbaum 36632a6c1a trainig_bootc workflow 2024-05-07 19:28:37 +03:00
Liora Milbaum d6fd60a028 trainig_bootc workflow 2024-05-07 18:59:23 +03:00
Liora Milbaum 35bff85838 trainig_bootc workflow 2024-05-07 18:18:32 +03:00
Daniel J Walsh 997d39361f
Error on umasks other then 022
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-07 05:46:35 -06:00
Liora Milbaum 9eb06b660d trainig_bootc workflow 2024-05-07 14:15:30 +03:00
Liora Milbaum bfe26a5fdb trainig_bootc workflow 2024-05-07 14:10:03 +03:00
Liora Milbaum 381dc53abd trainig_bootc workflow 2024-05-07 14:02:19 +03:00
Liora Milbaum 8df738d3e3 trainig_bootc workflow 2024-05-07 13:52:28 +03:00
Liora Milbaum ed764f052b trainig_bootc workflow 2024-05-07 13:49:32 +03:00
Liora Milbaum 6bb845b77f trainig_bootc workflow 2024-05-07 13:42:27 +03:00
Liora Milbaum 8b4c1da8ca trainig_bootc workflow 2024-05-07 13:20:04 +03:00
Liora Milbaum 34132824cd trainig_bootc workflow 2024-05-07 12:56:12 +03:00
Liora Milbaum 8d7086319f trainig_bootc workflow 2024-05-07 12:38:26 +03:00
Liora Milbaum b38226f0ae trainig_bootc workflow 2024-05-07 12:08:21 +03:00
Liora Milbaum c16650affe trainig_bootc workflow 2024-05-07 11:53:04 +03:00
Liora Milbaum 4ae5f7e606 trainig_bootc workflow 2024-05-07 11:37:02 +03:00
Liora Milbaum 92624d12ff trainig_bootc workflow 2024-05-07 11:24:37 +03:00
Liora Milbaum 0436013bf9 trainig_bootc workflow 2024-05-07 11:08:12 +03:00
Liora Milbaum 9f82b2ef96
Merge pull request #484 from containers/split-training-bootc-workflow-build
split build and pull on bootc_training workflow
2024-05-07 10:56:26 +03:00
greg pereira caae984e76
containers-mirror --> containers
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-07 00:33:13 -07:00
Gregory Pereira 168471b068
Merge pull request #481 from containers/fix-model_converter-testing-paths
fixing run path for model_converter
2024-05-07 00:20:01 -07:00
greg pereira 814273515c
split build and pull
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-07 00:03:25 -07:00
Daniel J Walsh a2fdeca73c
Merge pull request #478 from containers/renovate/auto-merged-updates
chore(deps): update auto merged updates
2024-05-06 23:46:39 -04:00
Daniel J Walsh eaf619c8cf
Merge pull request #479 from containers/renovate/all
chore(deps): update all dependencies
2024-05-06 23:45:18 -04:00
greg pereira 968b2fa1ac
fixing run path for model_converter
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-06 09:06:15 -07:00
Liora Milbaum ec848381e2
Merge pull request #477 from containers/e2e-tests
Running e2e tests
2024-05-06 13:59:13 +03:00
Liora Milbaum 5faa6069e2 Running e2e tests
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-06 13:57:55 +03:00
Platform Engineering Bot 04f8c774cb chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-05-06 10:03:54 +02:00
Platform Engineering Bot ca0b1f1677 chore(deps): update all dependencies
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-05-06 02:03:59 +02:00
Gregory Pereira 7ed50766af
Merge pull request #475 from containers/add-pull-task-to-e2e-workflow
Add pull task to e2e workflow
2024-05-05 14:02:42 -07:00
greg pereira 0a30fc231c
retry options on run
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 11:43:02 -07:00
greg pereira 0c8648dbf1
consolidate ansible.cfgs
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:11:27 -07:00
greg pereira 146584fa8a
trigger tests
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:10:45 -07:00
greg pereira 94a2ac15a3
pull policy never and dont push to quay
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:10:45 -07:00
greg pereira 3e087254bd
adding async
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:10:45 -07:00
greg pereira 768b90e40a
allow for escape testing with hold-tests label
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:10:45 -07:00
greg pereira a8cc8ac046
split build into pull and build
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:10:45 -07:00
Gregory Pereira 1eec2101e7
Merge pull request #476 from Gregory-Pereira/e2e-consolidate-ansible-cfgs
ansible cfg refactor for e2e training workflow
2024-05-05 10:09:38 -07:00
greg pereira a6c27ddaa0
ansible cfg refactor
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-05 10:06:26 -07:00
Liora Milbaum 627a2c6ef2
Merge pull request #471 from containers/e2e
instructlab e2e testing
2024-05-05 18:50:37 +03:00
Colin Walters 6e92310fea Remove extra quote from ssh_public_key
Nice find by Xiaofeng!

Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-05 18:50:09 +03:00
Jason T. Greene ef4ae1848b
Merge pull request #473 from romfreiman/hf_token
HF_TOKEN is not propagated to the podman command
2024-05-05 08:03:57 -05:00
Rom Freiman 5ffea41e82 HF_TOKEN is not propagated to the podman command
And hence mixtral download fails

Downloading model failed with the following Hugging Face Hub error: 401 Client Error. (Request ID: Root=1-6637576e-28a8c5cb049f1dbb35d46d83;86121860-3ce0-419b-aed0-4fc79c440da7)

Cannot access gated repo for url https://huggingface.co/api/models/mistralai/Mixtral-8x7B-Instruct-v0.1/tree/main?recursive=True&expand=False.
Access to model mistralai/Mixtral-8x7B-Instruct-v0.1 is restricted. You must be authenticated to access it.

Signed-off-by: Rom Freiman <rfreiman@gmail.com>
2024-05-05 15:21:46 +03:00
Colin Walters 9636f3dcab tests: increase ansible verbosity 2024-05-05 05:45:28 -04:00
Liora Milbaum 470e1ef78d instructlab e2e testing
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-05 11:14:09 +03:00
Liora Milbaum 839611fa51
Merge pull request #468 from containers/instructlab-testing-framework-6
adding Tmate session, and testing playbook
2024-05-05 08:49:23 +03:00
greg pereira 3a492d1672
moving tmate to after bootc install
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-04 17:00:04 -07:00
Javi Polo 091d7cd4a1
Allow both json and toml as config files for bootc-image-builder
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-05-04 23:20:35 +02:00
greg pereira 5d6def2263
removing wait for connection for port timeout issue
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-04 11:24:54 -07:00
greg pereira 26afe50b37
removing stuff to fix tmate session
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-04 09:25:04 -07:00
greg pereira 4b08e9ef89
adding tmate session, and testing playbook
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-04 08:38:23 -07:00
Liora Milbaum a98479cf57
Merge pull request #467 from containers/reboot
Reboot instance after bootc install
2024-05-04 18:10:20 +03:00
Liora Milbaum c3b132dc41 Reboot instance after bootc install
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-04 18:07:10 +03:00
Liora Milbaum 74c81b70fb
Merge pull request #464 from containers/build-and-install
Build and Install Bootc Image
2024-05-04 11:59:15 +03:00
Liora Milbaum 5eaa0b8ea0 Build and Install Bootc Image
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-04 11:11:32 +03:00
Gregory Pereira e9d5aa8847
Merge pull request #428 from containers/instructlab-testing-framework-4
bootc e2e workflow - run the e2e tests
2024-05-03 15:12:23 -07:00
greg pereira bcf522f80c removing ssh timeout and ansible.cfg
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-04 01:02:27 +03:00
greg pereira 0eba1abe57 removing ssh timeout and ansible.cfg
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-03 23:35:37 +03:00
greg pereira 16f383305d check access to ilab
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-03 23:35:37 +03:00
greg pereira 07027382b0 check access to ilab
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-03 23:35:37 +03:00
greg pereira 551ad9204a test I still have access to the box
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-03 23:35:37 +03:00
Gregory Pereira e6298cda73
Merge pull request #463 from containers/schedule
Reschedule testing framework workflow to run once a day
2024-05-03 12:15:13 -07:00
Liora Milbaum 732c24fe83 Reschedule testing framework workflow to run once a day
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-03 22:12:56 +03:00
Shreyanand 705b5d172e
Add milvus vector database for rag recipe
Signed-off-by: Shreyanand <shanand@redhat.com>
Co-authored-by: Michael Clifford <mcliffor@redhat.com>
Co-authored-by: greg pereira <grpereir@redhat.com>
2024-05-03 12:30:29 -04:00
Daniel J Walsh e25128ee7e
Merge pull request #462 from rhatdan/instructlab
Maintain permissions when copying files into build directories
2024-05-03 12:28:29 -04:00
Daniel J Walsh 6eb5cdccc5
Merge pull request #455 from javipolo/bootc-image-builder
Add target for creating disk-images
2024-05-03 12:28:07 -04:00
Daniel J Walsh 5a6021384c
Maintain permissions when copying files into build directories
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-03 12:24:36 -04:00
Javi Polo 4cb23bbf1e
Add target for creating disk-images
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-05-03 17:56:16 +02:00
Daniel J Walsh d3ba2b62fb
Merge pull request #458 from javipolo/custom_instructlab_repo
Allow to use a different instructlab git repository via env vars
2024-05-03 11:03:10 -04:00
Daniel J Walsh e2ead10229
Merge pull request #460 from danmcp/main
README cleanup
2024-05-03 10:17:12 -04:00
Dan McPherson 2a7c7f8d04 README cleanup
Signed-off-by: Dan McPherson <dmcphers@redhat.com>
2024-05-03 10:05:25 -04:00
Florent BENOIT a987adfcc6
chore: handle some AVX flags properly on certain Intel CPUs (#459)
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-05-03 09:51:03 -04:00
Daniel J Walsh ff57e9ea98
Merge pull request #457 from benoitf/fix-intel-instructions
chore: handle some AVX flags properly on certain Intel CPUs
2024-05-03 09:00:59 -04:00
Javi Polo a1ec1ced87
Allow to use a different instructlab git repository via env vars
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-05-03 14:35:58 +02:00
Florent Benoit d4e06492ec chore: handle some AVX flags properly on certain Intel CPUs.
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-05-03 13:50:09 +02:00
Daniel J Walsh ed3b643b9d
Merge pull request #453 from javipolo/cloud-common
Fix Makefile.common path
2024-05-03 05:52:23 -04:00
Javi Polo 78be997d25
Fix Makefile.common path
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-05-03 10:30:47 +02:00
Daniel J Walsh ed3b6b601a
Merge pull request #452 from rhatdan/instructlab
Update training README.md
2024-05-02 21:48:08 -04:00
Daniel J Walsh e21ead37e8
Fix spelling found via codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 21:47:36 -04:00
Daniel J Walsh 760b6f78e3
Merge pull request #454 from danmcp/main
README.md cleanup
2024-05-02 21:39:14 -04:00
Dan McPherson d66a70c5bd README.md cleanup
Signed-off-by: Dan McPherson <dmcphers@redhat.com>
2024-05-02 20:03:53 -04:00
Jason T. Greene 1e39174d03
Merge pull request #451 from rhatdan/instructlab
Remove typo from removal of deepspeed-trainer
2024-05-02 14:17:53 -05:00
Daniel J Walsh c80eb17317
Remove typo from removal of deepspeed-trainer
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 15:15:27 -04:00
Liora Milbaum 099c15f4e4
Merge pull request #449 from Gregory-Pereira/remove-scheduling-on-e2e-testing
remove chron schedulign for the e2e workflow as its not ready
2024-05-02 22:01:12 +03:00
greg pereira 3dd2091a55
remove chron schedulign for the e2e workflow as its not ready
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-02 11:59:08 -07:00
Jason T. Greene ef96d97991
Merge pull request #448 from n1hility/fix-template
fix template
2024-05-02 13:32:34 -05:00
root 234f1d4954 fix template
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-05-02 13:31:03 -05:00
Daniel J Walsh 1872a14d5f
Merge pull request #447 from rhatdan/instructlab
Cleanout OCI build Directory first when doing a make
2024-05-02 14:28:02 -04:00
Daniel J Walsh 3d2fb46e8f
Cleanout OCI build Directory first when doing a make
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 14:19:01 -04:00
Jason T. Greene c425e7c012
Merge pull request #446 from rhatdan/instructlab
Add prune target to cleanup wasted containers/storage
2024-05-02 12:28:15 -05:00
Daniel J Walsh 3cc034b4be
Add prune target to cleanup wasted containers/storage
We are seeing lots of users running out of disk space.
The target should help free up wasted space, but be
carefull no builds are running when you execute the command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 13:21:22 -04:00
Daniel J Walsh 261ccf886a
Merge pull request #443 from n1hility/fix-deepspeed
Fix deep speed
2024-05-02 13:05:55 -04:00
Daniel J Walsh 208ac106f5
Merge pull request #444 from n1hility/fix-vllm-pull
Fix type-o that breaks pull on vllm
2024-05-02 13:05:13 -04:00
Daniel J Walsh 454e9873b0
Merge pull request #445 from n1hility/fix-scripts
Make sure all scripts are included, fix template issues
2024-05-02 13:04:42 -04:00
root a730e92a6c Make sure all scripts are included, fix template issues
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-05-02 12:01:51 -05:00
Jason T. Greene 1eee05e888 Fix type-o that breaks pull on vllm
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-05-02 11:42:20 -05:00
Jason T. Greene 41a5116019 Restore sequential pip due to conflicts when flattened
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-05-02 11:17:04 -05:00
Jason T. Greene 47420601fb
Merge pull request #442 from rhatdan/instructlab
Add installation support for deepspeed
2024-05-02 10:57:47 -05:00
Daniel J Walsh f9a9998c92
Add installation support for deepspeed
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 11:51:25 -04:00
Daniel J Walsh 0dcc095ae3
Merge pull request #441 from rhatdan/instructlab
Growfs is on the wrong line
2024-05-02 11:04:25 -04:00
Daniel J Walsh db6a847156
Merge pull request #440 from n1hility/sync-two
Include new hi-fidelity implementation and container images
2024-05-02 11:02:09 -04:00
Daniel J Walsh 2bf7dc5f25
Growfs is on the wrong line
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 10:55:42 -04:00
Jason T. Greene 226cc06005 Image changes
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-05-02 09:15:18 -05:00
Jason T. Greene da03612214 Sync work streams. More improvements.
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-05-02 09:07:15 -05:00
Daniel J Walsh c98bf50798
Merge pull request #439 from rhatdan/instructlab
intel training container is now pulling in vllm container
2024-05-02 09:51:18 -04:00
Daniel J Walsh 3d098996b4
intel training container is now pulling in vllm container
In order to run podman inside of a container we need to disable
SELinux enforcement and add CAP_SYS_ADMIN to allow mounting
of overlay file systems. This matches what we are doing in the
nvidia and amd bootc containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 09:37:23 -04:00
Daniel J Walsh ab1b66c1a7
Merge pull request #437 from rhatdan/instructlab
Add growfs systemd service to bootc images
2024-05-02 09:33:33 -04:00
Liora Milbaum a5fba2387d
Merge pull request #436 from containers/reboot
restart test environment instance after bootc install
2024-05-02 15:46:25 +03:00
Sally O'Malley 0037f97c98
Merge pull request #438 from rhatdan/bootc
Create build dir if not previously created
2024-05-02 08:38:08 -04:00
Daniel J Walsh 271f38d513
Add growfs systemd service to bootc images
This is a little hacky to just get this in.  Would be
better if we shared this all with the recipes subdir,
but for speed I just want to get this in.

We will need to revisit the Makefile.common concept
to share more between recipes and training.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 08:30:08 -04:00
Daniel J Walsh eb9b1bea53
Create build dir if not previously created
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 08:29:25 -04:00
Liora Milbaum 4f93fac826 restart test environment instance after bootc install
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-05-02 14:55:40 +03:00
Daniel J Walsh 3abc87ee83
Merge pull request #427 from rhatdan/instructlab
Use OCI Transport for embeded images to save time
2024-05-02 07:18:37 -04:00
Daniel J Walsh 1c4b4ed1ac
Merge pull request #426 from MichaelClifford/v1.1.0_objdetpython
Add object detection model server readme
2024-05-02 07:17:42 -04:00
Daniel J Walsh 6a42054fe1
Use OCI Transport for embeded images to save time
No reason to use containers/storage for instructlab or vllm
since we are only building for embedding within a bootc image.
By storing directly in OCI, we can save many minutes and lots of
disk size.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-02 07:15:19 -04:00
Daniel J Walsh c05ecc3d1f
Merge pull request #433 from javipolo/rpm_extra_packages
Add EXTRA_RPM_PACKAGES to image Containerfile
2024-05-02 07:11:38 -04:00
Javi Polo b73c3fa962
Add EXTRA_RPM_PACKAGES to image Containerfile
Signed-off-by: Javi Polo <jpolo@redhat.com>
2024-05-02 13:06:44 +02:00
Daniel J Walsh 01506746fb
Merge pull request #432 from PaulYuuu/growfs-fix
fix(growfs): Correct the source path to be copied
2024-05-02 07:00:11 -04:00
Yihuang Yu 46699662be
fix(growfs): Correct the source path to be copied
The current source path is `../../common/usr` and it will copy to
destination path `build/usr/usr/`. I checked that the result are
different between Linux and MacOS, so modify to adapt different
platforms.

fix: #410
Signed-off-by: Yihuang Yu <yihyu@redhat.com>
2024-05-02 13:26:44 +08:00
Gregory Pereira 00a213a67b
Merge pull request #422 from containers/instructlab-testing-framework-3
upping worker and running bootc install
2024-05-01 14:11:31 -07:00
Daniel J Walsh 3019ebb2d3
Merge pull request #423 from MichaelClifford/v1.1.0_convert
Small text updates to converter readme
2024-05-01 16:52:43 -04:00
Daniel J Walsh e1ba968358
Merge pull request #425 from ericcurtin/arch
Use ARCH variable, so we fail early on aarch64
2024-05-01 16:51:47 -04:00
Daniel J Walsh 251a48bb63
Merge pull request #424 from ericcurtin/increase-timeout
Timeout of 300 seconds too low
2024-05-01 16:50:51 -04:00
greg pereira fb1c062bc8
upping worker and running bootc install
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-01 13:37:07 -07:00
Michael Clifford 1452a5d40d small text updates to converter readme
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-01 16:02:00 -04:00
Michael Clifford 88102bbf35 add object detection model server readme
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-05-01 15:47:07 -04:00
Eric Curtin 5d7f590bd2 Use ARCH variable, so we fail early on aarch64
When using this on alternate platform like aarch64, at least it will
cause the make script to fail early when the aarch64 file doesn't exist,
rather than incorrectly downloading the amd64 version. aarch64 chrome
may get packaged in future also.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-05-01 19:51:46 +01:00
Eric Curtin 09aa83772b Timeout of 300 seconds too low
I was on bus wifi running this, but still:

make[1]: Entering directory '/home/ecurtin/git/ai-lab-recipes/recipes/natural_language_processing/chatbot'
curl --progress-bar --max-time 300 --connect-timeout 60 -LO https://www.slimjet.com/chrome/files/103.0.5060.53/google-chrome-stable_current_amd64.deb

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-05-01 19:22:53 +01:00
Gregory Pereira 8ea285a6a1
Merge pull request #413 from containers/instructlab-testing-framework-2
Bootc testing framework run playbook and install bootc binary
2024-05-01 10:41:53 -07:00
greg pereira 0b36defc49
creating anisble playbooks and more content to testing framework
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-05-01 10:35:33 -07:00
Daniel J Walsh 8c45bdd018
Merge pull request #421 from kwozyman/nvidia-fix-rhel9
Fix Nvidia driver build for RHEL 9.4
2024-05-01 13:15:09 -04:00
Daniel J Walsh 16d27a674b
Merge pull request #410 from sallyom/growfs
Add growfs service to chatbot/bootc Containerfiles
2024-05-01 13:12:39 -04:00
sallyom eadfd76e1a add growfs service to chatbot/bootc Containerfiles
Co-authored-by: cgwalters <walters@redhat.com>
Signed-off-by: sallyom <somalley@redhat.com>
2024-05-01 12:04:43 -04:00
Gregory Pereira 4419054197
Merge pull request #420 from n1hility/repair-history
Repair history
2024-05-01 08:14:21 -07:00
Costin Gamenț 4f060bf7e0 Fix Nvidia driver build for RHEL 9.4
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-05-01 16:44:43 +02:00
Jason T. Greene 69942520ca Merge commit 'fad15ea'
Repairs git history
2024-05-01 09:38:04 -05:00
Daniel J Walsh 5cf744269e
Merge pull request #415 from rhatdan/instructlab
Add cloud-init build feature
2024-05-01 07:44:03 -04:00
Daniel J Walsh 0a3e1b8950
Merge pull request #418 from rhatdan/rhel
Remove beta, rhel9.4 is released
2024-05-01 07:41:09 -04:00
Daniel J Walsh f7a2ff654c
Add cloud-init build feature
Improve help and README to describe new functionality.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-01 07:30:22 -04:00
Daniel J Walsh d8e68ff4d7
Remove beta, rhel9.4 is released
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-01 07:29:36 -04:00
Daniel J Walsh 8326b5d665
Merge pull request #417 from containers/magma
add TMPDIR documentation
2024-05-01 06:03:03 -04:00
Costin Gamenț 714c0a8356 add TMPDIR documentation
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-05-01 11:17:43 +02:00
Jason T. Greene fad15eaa2f
Merge pull request #414 from jaideepr97/training-containerfile
Add containerfile for deepspeed training container
2024-05-01 00:10:14 -05:00
Jaideep Rao 6b4e84d4a6
fix pre-process command
Signed-off-by: Jaideep Rao <jaideep.r97@gmail.com>
2024-04-30 23:44:04 -04:00
jaideepr97 82741a7c0a address review comments
Signed-off-by: jaideepr97 <jaideep.r97@gmail.com>
2024-04-30 23:26:10 -04:00
jaideepr97 30ed517439 remove unnecessary lines
Signed-off-by: jaideepr97 <jaideep.r97@gmail.com>
2024-04-30 22:18:11 -04:00
jaideepr97 d6e91082a4 uncomment containerfile
Signed-off-by: jaideepr97 <jaideep.r97@gmail.com>
2024-04-30 22:06:40 -04:00
jaideepr97 487f3049fc missed adding new folder files
Signed-off-by: jaideepr97 <jaideep.r97@gmail.com>
2024-04-30 22:06:03 -04:00
jaideepr97 e9534382ab move files into deepspeed folder; add makefile
Signed-off-by: jaideepr97 <jaideep.r97@gmail.com>
2024-04-30 22:04:37 -04:00
jaideepr97 946605d701 add container file and script for training
Signed-off-by: jaideepr97 <jaideep.r97@gmail.com>
2024-04-30 21:45:57 -04:00
Jason T. Greene d4870e491c
Merge pull request #408 from cdoern/vllm
add vllm server container, ability to start the server, ilab generate
2024-04-30 19:34:57 -05:00
Charlie Doern c6d34b1a1a add vllm server container, ability to start the server, ilab generate
we now have the ability to do a top level `serve` in the ilab-wrapper which will start a vllm server, and run `generate` which will connect to the ENDPOINT_URL specified

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2024-04-30 19:46:24 -04:00
Jason T. Greene 4fe591d861
Merge pull request #412 from rhatdan/instructlab
Use --compress=false to speed up pushing of instruct-lab images
2024-04-30 17:06:06 -05:00
Daniel J Walsh 8f3d5374a8
Use --compress=false to speed up pushing of instruct-lab images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-30 17:58:20 -04:00
Gregory Pereira 638e4782de
Merge pull request #411 from containers/instructlab-testing-framework
create basic instructlab testing framework
2024-04-30 14:57:15 -07:00
Daniel J Walsh ea02398aa0
Merge pull request #409 from rhatdan/instructlab
Pull instructlab images out of local storage
2024-04-30 17:40:57 -04:00
greg pereira c8c93745db
updating workflows
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 14:40:16 -07:00
Daniel J Walsh 5199a0a5e1
Pull instructlab images out of local storage
Also create a Makefile.common in training so that the
different hardware vendors Makefiles can share options.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-30 17:30:02 -04:00
Daniel J Walsh c286e04e45
Merge pull request #406 from MichaelClifford/remove_finetune
Remove old fine tuning example
2024-04-30 17:13:32 -04:00
Daniel J Walsh e16741680d
Merge pull request #407 from Gregory-Pereira/fix-training-bootc-workflow-with-pr-401
fix bootc workflow with intel image rename
2024-04-30 17:13:17 -04:00
greg pereira 2e4fa3e3a2
create basic instructlab testing framework
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 14:01:17 -07:00
greg pereira 91c9922fbd
fix bootc workflow with intel image rename
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 12:58:07 -07:00
Michael Clifford 45331e9048 remove old finetuning example
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-30 15:55:42 -04:00
Michael Clifford 0b16817016
improve summary chunking (#397)
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-30 15:32:07 -04:00
Michael Clifford 7cde61b7f9
minor text edits to top dir files (#404)
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-30 15:30:53 -04:00
Costin Gamenț 223df753ef
Merge pull request #402 from enriquebelarte/habanalabs-fw-tools
Add hl-smi binary from firmware-tools
2024-04-30 21:07:35 +02:00
Gregory Pereira 2c2abd5d8e
Merge pull request #403 from Gregory-Pereira/update-instructlab-workflow-name
updating instructlab workflow name
2024-04-30 11:49:09 -07:00
greg pereira 6875ebcc0c
updating instructlab workflow name
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 11:48:40 -07:00
Enrique Belarte Luque f0ce43b04a
Add hl-smi binary from firmware-tools
Adding hl-smi to image so hardware can be queried

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-04-30 13:43:23 -05:00
Gregory Pereira f7126ccab1
Merge pull request #394 from Gregory-Pereira/better-workflow-names
reworking workflow names for visibility from actions tab
2024-04-30 11:33:27 -07:00
Daniel J Walsh bc6c70c650
Merge pull request #401 from rhatdan/instructlab
Fix name of intel-bootc
2024-04-30 13:59:57 -04:00
Daniel J Walsh f893c5fec0
Fix name of intel-bootc
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-30 13:58:45 -04:00
Daniel J Walsh e39ec7dca2
Merge pull request #400 from Gregory-Pereira/create-instructlab-images-workflow
adding instructlab workflow and renaming bootc workflow
2024-04-30 13:06:57 -04:00
Daniel J Walsh bdc40a8c42
Merge pull request #360 from n1hility/add-ilab-nvidia
Add nvidia-instructlab-bootc and supporting materials
2024-04-30 13:05:45 -04:00
Daniel J Walsh f114739eaf
Merge pull request #396 from enriquebelarte/intel-bootc
Add missing habanalabs modules
2024-04-30 13:04:31 -04:00
greg pereira 939359c9fa
standardizing workflow file naming conventions
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 10:01:35 -07:00
greg pereira 7b9b5b5f0c
reworking workflow names for visibility from actions tab
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 09:58:28 -07:00
greg pereira e53dc72e60
adding instructlab workflow and renaming bootc workflow
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-30 09:52:06 -07:00
Costin Gamenț b368f5227e
Merge pull request #398 from containers/magma
add model container builder
2024-04-30 18:49:59 +02:00
Costin Gamenț fc2fe7a916 Update training/model/Makefile
Co-authored-by: Gregory Pereira <grpereir@redhat.com>
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-30 18:12:42 +02:00
Costin Gamenț 4490863fe0 better download script
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-30 17:31:45 +02:00
Costin Gamenț c3197ce229 Use ugly Python hack for smaller download
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-30 17:31:45 +02:00
Costin Gamenț 04a7d08d20 Intermediary model container
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-30 17:31:45 +02:00
Enrique Belarte Luque 1520816757
Add missing habanalabs modules
Adds habanalabs_cn.ko.xz, habanalabs_en.ko.xz and habanalabs_ib.ko.xz kernel modules.
Also adds missing firmware files.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-04-30 08:18:21 -05:00
Daniel J Walsh bece6e6a2a
Merge pull request #386 from rhatdan/instructlab
With latest rocm-smi no need for EPEL in Containerfile
2024-04-30 07:32:24 -04:00
Daniel J Walsh ab5eccab82
Merge pull request #390 from Gregory-Pereira/add-slack-notifications-for-instructlab-base-workflows
add slack notifications to instructlab wofklows
2024-04-30 07:32:12 -04:00
Jason T. Greene c6c86c62cb Add nvidia-instructlab-bootc and supporting materials
This extends nvidia-bootc:
  - Adds the instructlab
  - Uses a save/load approach instead of pull to avoid registry  issues
  - Adds an ilab wrapper script to orchestrate usage of ilab
    + In the near future this will be extended to coordinate the soon
      to come multi-container mechanism for training but gets us
      something working now.
  - Adds ssh key setup

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-04-30 04:37:16 -05:00
Platform Engineering Bot c0d32e2422 Update Auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-04-30 04:00:52 +02:00
Gregory Pereira f4bf76f6d6
Merge pull request #388 from Gregory-Pereira/version-pin-ubuntu-runner
version pinning ubuntu runner
2024-04-29 17:20:47 -07:00
Gregory Pereira 28de0c6c88
Merge pull request #392 from Gregory-Pereira/update-ailab-images-with-bootcs
update ailab-images with intel-bootc and amd-bootc
2024-04-29 16:54:35 -07:00
greg pereira f3b74ccf13
version pinning ubuntu runner
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 16:44:01 -07:00
greg pereira fb214c6970
update ailab-images with intel-bootc and amd-bootc
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 15:47:14 -07:00
Gregory Pereira 2b94847d15
Merge pull request #350 from Gregory-Pereira/311-swap-granite-for-mistral-cleanup
swap granite for mistral cleanup + model and recipe housekeeping
2024-04-29 15:38:54 -07:00
greg pereira 3f29cb11fc
add slack notifications to instructlab wofklows
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 15:26:19 -07:00
Gregory Pereira 22a93cdad4
Merge pull request #387 from Gregory-Pereira/refactor-instructlab-workflow-using-make
refactor instructlab training images to use make targets
2024-04-29 15:23:30 -07:00
Gregory Pereira b948c4798b
Merge pull request #389 from Gregory-Pereira/fixing-ms-workflow-download
download models from models dir
2024-04-29 15:16:23 -07:00
greg pereira 2167fb4486
consolidate amd-bootc and intel-bootc steps
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 15:14:57 -07:00
greg pereira f48611ac5a
download models from models dir
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 15:09:27 -07:00
greg pereira fcb16cf191
misc fixes
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 14:51:45 -07:00
greg pereira 5bbe2213ee
adding and ensuring consistency of whisper-small and mistral-code models
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 14:49:22 -07:00
greg pereira e8aed1685a
swapping standard mistral with granite as default
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 14:49:02 -07:00
Liora Milbaum 3b85f7df17
Merge pull request #385 from lmilbaum/chatbot-workflow
Downloading models makefile moved
2024-04-30 00:36:20 +03:00
greg pereira 814cad7445
refactor instructlab training images to use make targets
changes:
1) add label and arch options to builds
2) extending workflow to intel-bootc, amd-bootc, and better workflow naming

Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 14:15:04 -07:00
Liora Milbaum 53b4a014e5 Downloading models makefile moved
Signed-off-by: Liora Milbaum <lmilbaum@redhat.com>
2024-04-29 23:55:02 +03:00
Daniel J Walsh 5a769dfe06
With latest rocm-smi no need for EPEL in Containerfile
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-29 16:54:47 -04:00
Daniel J Walsh 39252810d9
Merge pull request #367 from PaulYuuu/bib-skip-bootc-build
minor update for `bootc-image-builder` target
2024-04-29 15:43:34 -04:00
Daniel J Walsh 1f2db77a01
Merge pull request #368 from rhatdan/instructlab
Rename training repos to add bootc- indicator
2024-04-29 15:43:14 -04:00
Daniel J Walsh 93453e0907
Rename training repos to add bootc- indicator
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-29 15:42:43 -04:00
Daniel J Walsh 56ea762aab
Merge pull request #369 from containers/training-docs
Expand documentation for training images
2024-04-29 15:39:00 -04:00
Daniel J Walsh 70ac998c5f
Merge pull request #376 from MichaelClifford/summary_eval
add rouge score to summarizer
2024-04-29 15:38:48 -04:00
Gregory Pereira 7c41d1ec13
Merge pull request #383 from Gregory-Pereira/fix-base-instructlab-workflow-14
only build from dispatch and cron, not paths
2024-04-29 11:51:26 -07:00
greg pereira 93fae6dd31
only build from dispatch and cron, not paths
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 11:50:58 -07:00
Gregory Pereira bac269363c
Merge pull request #382 from Gregory-Pereira/fix-base-instructlab-workflow-13
reverting to once a day testing
2024-04-29 11:47:53 -07:00
greg pereira 5d6d6384c6
reverting to once a day testing
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 11:47:06 -07:00
Gregory Pereira 5284476d88
Merge pull request #381 from Gregory-Pereira/fix-base-instructlab-workflow-12
using image name nvidia-bootc for /training/nvidia/Containerfile
2024-04-29 11:33:53 -07:00
greg pereira a1846438b5
using image name nvidia-bootc for /training/nvidia/Containerfile
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 11:21:53 -07:00
Gregory Pereira a8bf207fdc
Merge pull request #380 from Gregory-Pereira/fix-base-instructlab-workflow-11
updding cronworkflow to once per hour + fixing push
2024-04-29 11:02:26 -07:00
greg pereira 82344de6f4
updding cronworkflow to once per hour + fixing push
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 11:02:02 -07:00
Gregory Pereira 22adca69ff
Merge pull request #379 from Gregory-Pereira/fix-base-instructlab-workflow-10
adding the schedule run back in
2024-04-29 10:57:15 -07:00
greg pereira cd8432224b
adding the schedule run back in
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 10:56:52 -07:00
Gregory Pereira 3d0224f0b3
Merge pull request #378 from Gregory-Pereira/fix-base-instructlab-workflow-9
removing hello-world step
2024-04-29 10:44:01 -07:00
greg pereira 3f5e1f76ea
removing hello-world step
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 10:43:37 -07:00
Gregory Pereira 19a12b2bf3
Merge pull request #377 from Gregory-Pereira/fix-base-instructlab-workflow-8
runner found, adding back code and swap to 8 cores
2024-04-29 10:38:21 -07:00
greg pereira 6de644a960
runner found, adding back code and swap to 8 cores
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 10:37:27 -07:00
Liora Milbaum b1be25daa5 Remove dummy workflow - problem solved 2024-04-29 20:36:48 +03:00
Costin Gamenț b206671567 expand documentation
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-29 19:26:16 +02:00
Liora Milbaum 15ef21ce57 debugging runners 2024-04-29 20:23:00 +03:00
Gregory Pereira a3533cccb8
Merge pull request #375 from Gregory-Pereira/fix-base-instructlab-workflow-7
even more simple
2024-04-29 10:15:04 -07:00
greg pereira 5a5ef5db09
even more simple
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 10:14:29 -07:00
Costin Gamenț d73db8dd01
Merge pull request #366 from enriquebelarte/amd-rocm-smi
Install rocm-smi package
2024-04-29 19:12:46 +02:00
Gregory Pereira 6b218d869c
Merge pull request #374 from Gregory-Pereira/fix-base-instructlab-workflow-6
going back to basics with 2core runner
2024-04-29 10:05:24 -07:00
greg pereira 418b57b7a2
going back to basics with 2core runner
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 10:04:33 -07:00
Gregory Pereira 5eeb7b307d
Merge pull request #373 from Gregory-Pereira/fix-base-instructlab-workflow-5
swap to 2core to test runner getting picked up
2024-04-29 09:56:25 -07:00
greg pereira 4ac9304477
swap to 2core to test runner getting picked up
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 09:55:18 -07:00
Gregory Pereira 4f31d5c30e
Merge pull request #372 from Gregory-Pereira/fix-base-instructlab-workflow-4
fixing instruct-nvidia workflow builds
2024-04-29 09:48:41 -07:00
greg pereira 6d6570b048
fixing instruct-nvidia workflow builds
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 09:46:56 -07:00
Michael Clifford 997e9ebd8a add rouge score to summarizer
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-29 12:34:40 -04:00
Gregory Pereira 0f7f5aa62b
Merge pull request #371 from Gregory-Pereira/fix-base-instructlab-workflow-3
typo for github runner 2
2024-04-29 09:20:13 -07:00
greg pereira b7d3bed693
typo for github runner 2
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 09:19:53 -07:00
Gregory Pereira 5a6a39b508
Merge pull request #370 from Gregory-Pereira/fix-base-instructlab-workflow-2
typo for github runner
2024-04-29 09:02:28 -07:00
greg pereira 539a141f76
typo for github runner
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 09:01:51 -07:00
Gregory Pereira cb1a78af32
Merge pull request #365 from Gregory-Pereira/fix-base-instructlab-workflow
moving workload to mirrors-repo
2024-04-29 08:30:35 -07:00
greg pereira 4aa00b8172
moving workflow to large fs worker in mirror
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-29 08:29:51 -07:00
Yihuang Yu 2ba7c8f0a5
refactor: udpate DISK_USER and DISK_GROUP
DISK_USER and DISK_GROUP are from #299, they are used for bib option
`--chown`. However, the current variable name may cause
misunderstanding, mislead people into thinking it's a user of operation
system inside disk, so rename them.

Also, add these 2 variables into the README.

Signed-off-by: Yihuang Yu <yihyu@redhat.com>
2024-04-29 22:07:43 +08:00
Yihuang Yu 6367dd4273
rfe(bootc-image-builder): Skip building bootc image if exists
`bootc-image-builder` target depends on `bootc`, even the bootc image
exists in the local storage, it still builds a new one. As we add
`--local` in the podman command line, so this commit only check image in
local storage, will not check remote registry.

Signed-off-by: Yihuang Yu <yihyu@redhat.com>
2024-04-29 22:00:56 +08:00
Enrique Belarte Luque d997b07b2d
Install rocm-smi package
Adds the rocm-smi package to get info about amdgpu.

Signed-off-by: Enrique Belarte Luque <ebelarte@redhat.com>
2024-04-29 08:41:45 -05:00
Daniel J Walsh 5c705b2817
Merge pull request #358 from rhatdan/instructlab
Fixes for configuring training
2024-04-29 09:18:23 -04:00
Daniel J Walsh b14871068a
Merge pull request #362 from containers/renovate/all
Update all dependencies
2024-04-29 09:16:05 -04:00
Daniel J Walsh 0e563c852c
Merge pull request #363 from hellohellenmao/timao
Update the ailab images link in README
2024-04-29 09:15:28 -04:00
Tingting Mao e482dba653 Update the ailab images link in README
Signed-off-by: Tingting Mao <timao@redhat.com>
2024-04-29 17:13:14 +08:00
Platform Engineering Bot 9dac374a08 Update all dependencies
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-04-29 03:00:56 +02:00
Sally O'Malley 33f3db3afd
Merge pull request #359 from cooktheryan/README_fix
improper variable definition
2024-04-28 19:11:53 -04:00
Ryan Cook 7ed976246c improper variable definition
Signed-off-by: Ryan Cook <rcook@redhat.com>
2024-04-28 15:43:15 -04:00
Daniel J Walsh fd9f18f826
Merge pull request #352 from Gregory-Pereira/upgrade-mistral-7b-instruct-to-v2
[Model Upgrade] upgrade `mistral-7b-instruct-v0.1` to `mistral-7b-instruct-v0.2`
2024-04-28 11:32:27 -04:00
Daniel J Walsh a7cc5e8582
Fixes for configuring training
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-28 11:30:53 -04:00
Gregory Pereira 94e38e1c12
Merge pull request #355 from Gregory-Pereira/fix-model-converter-workflow
fix push image step double registry
2024-04-27 22:17:23 -07:00
greg pereira 8b6423b55f
fix push image step double registry
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-27 21:37:47 -07:00
Gregory Pereira 9c9188bb94
Merge pull request #308 from Gregory-Pereira/test-convert-models-build-perms
try non protected build with path changes
2024-04-27 20:57:16 -07:00
greg pereira 5a7c29f336
using abs path
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-27 20:56:54 -07:00
greg pereira 9da353b80c
try non protected build with path changes
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-27 19:36:41 -07:00
greg pereira 9efba0f094
upgrade mistral-7b-instruct to v2
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-27 13:12:05 -07:00
Gregory Pereira 9c2a77908a
Merge pull request #348 from MichaelClifford/token_count
Get exact token count in summarizer
2024-04-27 12:02:00 -07:00
Gregory Pereira 2444458950
Merge pull request #347 from rhatdan/instructlab
Break apart push
2024-04-27 09:14:50 -07:00
Michael Clifford 5ae341d454 get exact token counts
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-27 09:35:41 -04:00
Daniel J Walsh a662fbb9e6
Break apart push
Make it easy to push nvidia and amd instructlab images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-27 05:38:25 -04:00
Gregory Pereira fbc6d6c247
Merge pull request #345 from sallyom/add-instruct-lab-images
add instructlab nvidia base image
2024-04-26 13:06:46 -07:00
Daniel J Walsh d4fbbdc4a3
Fix typo in instruclab Makefile (#346)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-26 15:35:40 -04:00
Sally O'Malley 1abe6c580b
Update .github/workflows/instructlab_baseimages_build_push.yaml
Co-authored-by: Gregory Pereira <gregpere17@gmail.com>
2024-04-26 15:13:16 -04:00
sallyom ad60cbf204 add nvidia-builder image
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-26 11:04:49 -04:00
sallyom db134de482 add instructlab nvidia base image
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-26 10:30:00 -04:00
Daniel J Walsh 12555f30d3
Merge pull request #341 from rhatdan/instructlab
Add building of instructlab container images
2024-04-26 07:19:15 -04:00
Daniel J Walsh c3ea183dfb
Merge pull request #340 from rhatdan/models
Add -bootc identifier to training images
2024-04-25 20:24:17 -04:00
Daniel J Walsh a576bcf39f
Merge pull request #344 from rhatdan/clean
Add clean for models, wastes lots of space
2024-04-25 20:23:51 -04:00
Daniel J Walsh f2370871c0
add building of instructlab container images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-25 14:36:22 -04:00
Daniel J Walsh 477bda9753
Merge pull request #342 from MichaelClifford/pdf
Add pdf option to rag recipe
2024-04-25 14:29:31 -04:00
Daniel J Walsh f28f496a61
Add clean for models, wastes lots of space
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-25 14:27:56 -04:00
Michael Clifford 1270b68d82 add pdf option to rag recipe
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-25 14:12:32 -04:00
Daniel J Walsh 5b13e45e28
Add -bootc identifier to training images
Also set default image in Containerfile and do not
set it in Makefile.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-25 13:55:52 -04:00
Daniel J Walsh df755ca04a
Merge pull request #339 from MichaelClifford/new_default
make granite default for models/ and llamacpp/
2024-04-25 13:47:15 -04:00
Michael Clifford 273ab06aa1 make granite default for models and llamacpp
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-25 13:24:30 -04:00
Daniel J Walsh a680d5a614
Merge pull request #335 from containers/magma
Intel Habanalabs bootc image
2024-04-25 10:51:28 -04:00
Costin Gamenț 6571043217 Intel Habanalabs bootc image
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-25 16:42:38 +02:00
Daniel J Walsh c4479e6dc6
Merge pull request #333 from MichaelClifford/new_default
Update suggested model in chat and summary docs
2024-04-24 17:14:21 -04:00
Daniel J Walsh 0109d08925
Merge pull request #330 from MichaelClifford/pdf
set summarizer write to tempfile
2024-04-24 17:13:39 -04:00
Michael Clifford ec30822065 update suggested model in chat and summary docs
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-24 16:43:24 -04:00
Daniel J Walsh 524c759bf8
Merge pull request #275 from MichaelClifford/data
Add model download utility
2024-04-24 16:21:14 -04:00
Michael Clifford 9f8dab040b use tempfile for summarizer
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-24 14:27:06 -04:00
Daniel J Walsh 751608f975
Merge pull request #329 from Gregory-Pereira/expand-download-timeouts
upping model download timeout and connection values
2024-04-24 13:20:06 -04:00
Daniel J Walsh c630f4177b
Merge pull request #332 from containers/magma
Better separation between CentOS and RHEL
2024-04-24 12:56:43 -04:00
Hema Veeradhi 6439623e87
Update whisper model recipe to convert audio files (#326)
Signed-off-by: Hema Veeradhi <hveeradh@redhat.com>
2024-04-24 12:48:41 -04:00
Daniel J Walsh cd0c8106e2
Merge pull request #331 from rhatdan/models
Cleanup NVIDIA training.
2024-04-24 12:43:57 -04:00
Daniel J Walsh aecccd5fea
Make Makefile optional fields optional
We have hardcoded fields in both the Makefile and the
Containerfiles, only hard code them in the Containerfiles.
So we are less likely to make a mistake.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-24 12:35:50 -04:00
Costin Gamenț cebe29f5c0 Better separation between CentOS and RHEL
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 18:12:34 +02:00
greg pereira 26731ed41b
upping model download timeout and connection values
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-24 08:56:15 -07:00
Daniel J Walsh 8ce99026ad
Switch CENTOS to OS in Containerfile
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-24 11:56:12 -04:00
Michael Clifford 8f96b15a1d set summarizer write to /tmp
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-24 10:41:34 -04:00
Daniel J Walsh b9b3a6ff91
Merge pull request #328 from containers/magma
Accelerated container image for NVidia
2024-04-24 09:54:52 -04:00
Costin Gamenț 768a89c8fe update docs with NVidia target
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 15:50:03 +02:00
Costin Gamenț 00c9992a36 Fix for RHEL major version
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 15:50:03 +02:00
Costin Gamenț 8ed077d669 update makefiles with nvidia target
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 15:50:03 +02:00
Costin Gamenț 508204e957 add NVidia container
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 15:50:03 +02:00
Costin Gamenț 4ee9603250 disable realtime builds by default
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 15:50:03 +02:00
Costin Gamenț 5766a75234 add NVidia builder container
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-24 15:50:03 +02:00
Liora Milbaum 17200b9798
Merge pull request #325 from Gregory-Pereira/add-greg-to-codeowners
joining the org
2024-04-23 21:55:32 +03:00
greg pereira 7f415ea2d9
joining the org
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-23 11:53:41 -07:00
Daniel J Walsh 2226184378
Image names must be lower case (#324)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-23 14:33:45 -04:00
Gregory Pereira 737103ff66
Merge pull request #323 from Gregory-Pereira/fix-testing-framework-chatbot-bootc-image-not-found-2
forgot endif
2024-04-23 11:07:05 -07:00
greg pereira 4432456bce
forgot endif
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-23 11:02:16 -07:00
Daniel J Walsh 50014e6c46
Merge pull request #321 from Gregory-Pereira/fix-testing-framework-chatbot-bootc-image-not-found
quay defaults x86_64 arch to amd64
2024-04-23 12:59:39 -04:00
greg pereira 41e6ab5b66
quay defaults x86_64 arch to amd64
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-23 09:45:43 -07:00
Gregory Pereira 286935f44d
Merge pull request #320 from sallyom/model-image-push-build
remove extra registry in image push
2024-04-23 07:53:35 -07:00
Daniel J Walsh d631973f14
Merge pull request #319 from MichaelClifford/model_list
Update model download example in models README.md
2024-04-23 10:45:47 -04:00
sallyom f1e3203f61 remove extra registry in image push
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-23 10:33:08 -04:00
Michael Clifford 55537fcdf2 update model download example
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-23 10:21:04 -04:00
Daniel J Walsh 83d4818a63
Fixup download-models (#303)
The models/README.md described a bunch of download-model flags
that did not exist or were defined in different makefiles. This
PR removes the non-existing targets and adds the defined targets
into the models/Makefile and referenced from the others.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-23 10:12:29 -04:00
Daniel J Walsh 579eb45859
Merge pull request #316 from containers/magma
Accelerated container image for AMD
2024-04-23 09:18:28 -04:00
Daniel J Walsh e857debb01
Merge pull request #302 from MichaelClifford/pdf
add PDF reading to summarizer
2024-04-23 09:17:36 -04:00
Sally O'Malley b5092ee6de
Merge pull request #318 from sallyom/yet-another-try
after 10 failed attempts, finally updating the model-image workflow the right way
2024-04-23 09:16:46 -04:00
sallyom 3a4a0c596b stopped being dumb and updated model-image-workflow the right way
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-23 09:11:46 -04:00
Costin Gamenț b785c6516c accelerated container image for AMD
Signed-off-by: Costin Gamenț <cgament@redhat.com>
2024-04-23 15:03:20 +02:00
Sally O'Malley 43f9257b91
Merge pull request #317 from sallyom/remove-extra-registry-name-model-images
fix typo in model image names on push
2024-04-23 08:09:45 -04:00
sallyom 1571613b61 fix typo in model image names on push
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-23 08:03:21 -04:00
Daniel J Walsh 8150e012f2
Merge pull request #299 from PaulYuuu/bib-chown
rfe(bootc-image-builder): Support "--chown" option
2024-04-23 05:59:39 -04:00
Sally O'Malley 0f46218c4f
Merge pull request #314 from sallyom/another-another-model-image-fix
add mistral-7b-code model and change env
2024-04-22 23:49:30 -04:00
sallyom f77c8a833f update model images workflow, add mistral-7b-code model and change env
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-22 23:17:49 -04:00
Yihuang Yu 3e806ea932
rfe(bootc-image-builder): Support "--chown" option
bootc-image-builder requests root permission, which means the generated
disk image is own by the root user. Helpfully, bib provides the
"--chown" option to help us change the owner of the output directory.
This make user easy to custom UID:GID of the disk and use it later.

Signed-off-by: Yihuang Yu <yihyu@redhat.com>
2024-04-23 11:04:47 +08:00
Daniel J Walsh a725d2a624
Merge pull request #305 from rhatdan/progress
Show progress bar when downloading models
2024-04-22 20:19:03 -04:00
Sally O'Malley f850d398f1
Merge pull request #313 from sallyom/another-another-model-image-fix
add mistral-7b-code model and change env
2024-04-22 18:36:13 -04:00
sallyom 17226c9451 add mistral-7b-code model and change env
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-22 18:33:44 -04:00
Sally O'Malley df3b8eb01a
Merge pull request #312 from sallyom/another-model-image-fix
make model-images only run with cron or manual temporarily
2024-04-22 18:24:46 -04:00
sallyom 0ee549968f make model-images only run with cron or manual temporarily
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-22 18:24:09 -04:00
Sally O'Malley ef9ad50817
Merge pull request #309 from sallyom/remove-model-converter-from-workflow
temporarily remove model-converter image build
2024-04-22 17:12:13 -04:00
sallyom b3dcbc654d temporarily remove model-converter image build
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-22 17:05:09 -04:00
Gregory Pereira cb4da15115
Merge pull request #307 from Gregory-Pereira/fix-convert-models-container-build
fix convert_models build with build path permissions (temporary)
2024-04-22 12:44:27 -07:00
greg pereira b24ebea94d
fixing buildah bud builds due to permisions on build path
Signed-off-by: greg pereira <grpereir@redhat.com>

Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-22 12:41:25 -07:00
Sally O'Malley fd8a0a76f8
Merge pull request #306 from sallyom/add-model-workflows
fix convert_models context
2024-04-22 15:04:24 -04:00
sallyom 3e94c32bb7 fix convert_models context
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-22 15:00:01 -04:00
Sally O'Malley 7397906fd6
Merge pull request #304 from sallyom/add-model-workflows
add model workflows
2024-04-22 14:55:27 -04:00
Daniel J Walsh ad8562d2f4
Show progress bar when downloading models
When downloading models, the screen freezes for several
minutes, this changes to show progress.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-22 14:52:25 -04:00
sallyom 3ea0dfecd3 add model workflows
Signed-off-by: sallyom <somalley@redhat.com>
2024-04-22 14:17:30 -04:00
Daniel J Walsh 199bcb40e2
Merge pull request #301 from Gregory-Pereira/fix-testing-framwork-llamacpp-ref
fixing testing framework with image ref being moved
2024-04-22 13:46:15 -04:00
Michael Clifford 1fe53cbaea use file.name for pdf reader
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-22 13:45:17 -04:00
Daniel J Walsh 462d26e502
Merge pull request #300 from Gregory-Pereira/add-granite-models
adding merlinite and granite models
2024-04-22 13:20:38 -04:00
greg pereira 5ffe3e9205
adding merlinite and granite models
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-22 09:59:50 -07:00
greg pereira 5db0a4dd83
fixing testing framework with image ref being moved
Signed-off-by: greg pereira <grpereir@redhat.com>
2024-04-22 08:52:12 -07:00
Michael Clifford 88ea70705e add PDF reading to summarizer
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-22 11:20:58 -04:00
Daniel J Walsh 2f67b82306
Merge pull request #293 from MichaelClifford/summarizer_fix
Fix document chunking in summarizer
2024-04-22 08:18:09 -04:00
Daniel J Walsh 74c0e132e9
Merge pull request #296 from containers/renovate/all
chore(deps): update all dependencies
2024-04-22 08:15:27 -04:00
Daniel J Walsh 79acc1fa6a
Merge pull request #298 from vrothberg/update-descriptions
recipes: update descriptions
2024-04-22 08:14:59 -04:00
Valentin Rothberg 8b5adaab7e recipes: update descriptions
Update the descriptions of the recipes.  They are used by the AI Lab
Podman Desktop extension and were quite repetitive and did not guide the
user much into the various domains and use cases.  I tried to describe
a bit more what each recipe does.

Fixes: #297
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2024-04-22 10:17:25 +02:00
Platform Engineering Bot 0dfb63947e chore(deps): update auto merged updates
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-04-22 03:20:52 +02:00
Platform Engineering Bot b4ddf4599c chore(deps): update all dependencies
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-04-22 03:01:01 +02:00
Michael Clifford 90cb9bf44f fix text chunking in summarizer
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-21 13:31:00 -04:00
Daniel J Walsh 99f1bb365a
Merge pull request #287 from rhatdan/bootc
Add support for bootc on audio-to-text recipe
2024-04-20 17:36:09 -04:00
Daniel J Walsh 5417b0eedc
Merge pull request #292 from rhatdan/main
Consistently name llamacpp-python
2024-04-20 17:35:42 -04:00
Daniel J Walsh 9d7c175f73
Consistently name llamacpp-python
All through the code this is sometimes labeled llamacpp_python

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-18 22:05:07 -04:00
Daniel J Walsh b2d678dae4
Merge pull request #289 from PaulYuuu/makefile-style
fix: Convert to Makefile-style and correct wrong usage
2024-04-18 19:53:57 -04:00
Yihuang Yu 8c0dcedfc2
fix: Convert to Makefile-style and correct wrong usage
In a Makefile, when we use doule "$", we should make sure the variable
is present in the enviornment. However, in the current design, most
variables are Makefile variables, so that shell failed to handle them.

Signed-off-by: Yihuang Yu <yihyu@redhat.com>
2024-04-18 16:03:29 +08:00
Yihuang Yu f7dcf62559
fix: Correct NONINUX_AUTH_JSON to NONLINUX_AUTH_JSON
Signed-off-by: Yihuang Yu <yihyu@redhat.com>
2024-04-18 15:18:48 +08:00
Daniel J Walsh 63903b5998
Add support for bootc on audit-to-text recipe
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-17 17:58:19 -04:00
Michael Clifford 16bd930e7e add model download utility
Signed-off-by: Michael Clifford <mcliffor@redhat.com>
2024-04-15 22:02:48 -04:00
393 changed files with 59513 additions and 818 deletions

View File

@ -1,4 +1,4 @@
FROM quay.io/containers/podman:v4.9.4
FROM quay.io/containers/podman:v5.0.2
USER root

View File

@ -1,6 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>platform-engineering-org/.github"
]
}

33
.github/workflows/README.md vendored Normal file
View File

@ -0,0 +1,33 @@
# AI-Lab Recipes Infrastructure Documentation
## Standard Wofklows
Our standard workflows deal with building components and pushing their images to `quay.io/ai-lab`. These components include:
- recipe applications:
- Chatbot
- Codegen
- Summarizer
- RAG
- model_servers
- models
- instructlab workflows
- training bootc workflows
For a full list of the images we build check out or [quay organization](https://quay.io/organization/ai-lab). These standard workflows should all be run against our standard repo `containers/ai-labs-recipes` rather than the mirror repo.
## Testing frameworks
Our testing frameworks are a bit different from our standard workflows. In terms of compute, some of these jobs run either AWS machines provisioned via terraform using secrets in the github repository, or customized github hosted action runners, as well as the standard ubuntu-24.04 github runners for jobs not requiring additional resources.
These workflows start by checking out the [terraform-test-environment-module](https://github.com/containers/terraform-test-environment-module) repo, as well as the code in `containers/ai-lab-recipes` at the `main` branch. Then it will provision the terraform instance, install the correct ansible playbook requirements, and runs a coressponding playbook. Aditional actions may also be taken depending on the testing framework in question.
Finally all of our testing framework workflows will call `terraform destroy` to remove the aws instance we have provisioned and publish the results of the workflow to slack.
IMPORTATNT: If you are doing development and testing, please make sure that instances in AWS are spun down before leaving if you have access to the AWS account.
### training-e2e
The test environment is initially based off of `Fedroa 40`.
It bootstraps a `g5.8xlarge` AWS EC2 instance with Terraform.
Provisioning is executed with ansible. The ansible playbook is invoking bootc install and
reboots the instance.

View File

@ -8,6 +8,8 @@ on:
- ./recipes/common/Makefile.common
- ./recipes/natural_language_processing/chatbot/**
- .github/workflows/chatbot.yaml
- ./recipes/natural_language_processing/chatbot/app/**
- ./renovate.json
push:
branches:
- main
@ -23,9 +25,9 @@ env:
IMAGE_NAME: chatbot
jobs:
build-and-push-image:
chatbot-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -35,13 +37,69 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
- name: Install opentelemetry dependencies
run: |
pip install --no-cache-dir opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation
- name: Download OpenTelemetry Collector Contrib
run: |
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.103.0/otelcol-contrib_0.103.0_linux_amd64.tar.gz
tar -xvf otelcol-contrib_0.103.0_linux_amd64.tar.gz
- name: Write secrets to files
run: |
echo "${{ secrets.ROSA_OTEL_CACERT }}" > /tmp/ca.crt
echo "${{ secrets.ROSA_OTEL_SERVER_CRT }}" > /tmp/server.crt
echo "${{ secrets.ROSA_OTEL_SERVER_KEY }}" > /tmp/server.key
- name: Configure OpenTelemetry Collector
run: |
echo '
receivers:
otlp:
protocols:
grpc:
http:
exporters:
otlphttp:
endpoint: "${{ secrets.ROSA_OTEL_ENDPOINT }}"
tls:
insecure: false
cert_file: /tmp/server.crt
key_file: /tmp/server.key
ca_file: /tmp/ca.crt
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug, otlphttp]
' > otel-collector-config.yaml
- name: Run OpenTelemetry Collector
run: |
./otelcol-contrib --config otel-collector-config.yaml > otel-collector.log 2>&1 &
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Start job trace
run: |
export WORKFLOW_NAME="chatbot"
export JOB_NAME="chatbot-build-and-push"
export TRACE_ACTION="start"
python ci/trace-steps.py
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2.13
@ -52,18 +110,13 @@ jobs:
containerfiles: ./recipes/natural_language_processing/${{ env.IMAGE_NAME }}/app/Containerfile
context: recipes/natural_language_processing/${{ env.IMAGE_NAME }}/app
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
- name: Install Dependencies
working-directory: ./recipes/natural_language_processing/${{ env.IMAGE_NAME }}
run: make install
- name: Download model
working-directory: ./recipes/natural_language_processing/${{ env.IMAGE_NAME }}
run: make download-model-mistral
working-directory: ./models
run: make download-model-granite
- name: Run Functional Tests
shell: bash
@ -86,3 +139,11 @@ jobs:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}
- name: End job trace
run: |
export WORKFLOW_NAME="chatbot"
export JOB_NAME="chatbot-build-and-push"
export TRACE_ACTION="end"
python ci/trace-steps.py

View File

@ -23,9 +23,9 @@ env:
IMAGE_NAME: codegen
jobs:
build-and-push-image:
codegen-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -35,7 +35,7 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
@ -53,7 +53,7 @@ jobs:
context: recipes/natural_language_processing/${{ env.IMAGE_NAME }}/app
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
@ -62,8 +62,8 @@ jobs:
run: make install
- name: Download model
working-directory: ./recipes/natural_language_processing/${{ env.IMAGE_NAME }}
run: make download-model-mistral
working-directory: ./models
run: make download-model-mistral-code
- name: Run Functional Tests
shell: bash

79
.github/workflows/instructlab.yaml vendored Normal file
View File

@ -0,0 +1,79 @@
name: Instructlab image builds
on:
schedule: # schedule the job to run at 12 AM daily
- cron: '0 0 * * *'
# pull_request:
# branches:
# - main
# paths:
# - .github/workflows/instructlab_baseimages_build_push.yaml
# - training/nvidia
# push:
# branches:
# - main
# paths:
# - .github/workflows/instructlab_baseimages_build_push.yaml
# - training/nvidia
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
env:
REGISTRY: ghcr.io
REGISTRY_ORG: containers
jobs:
instructlab-nvidia:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
strategy:
matrix:
include:
- make_target: nvidia
- make_target: amd
runs-on: ubuntu-latest
# runs-on: ubuntu-22.04-2core # starting with minimal option
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.7
- name: Build Image
id: build_image
run: make ${{ matrix.make_target}}
working-directory: ./training/instructlab
- name: Login to Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/podman-login@v1.7
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"text": "${{ github.workflow }} workflow status: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

View File

@ -8,15 +8,15 @@ env:
CHATBOT_IMAGE_NAME: chatbot
CODEGEN_IMAGE_NAME: codegen
SUMMARIZER_IMAGE_NAME: summarizer
LLAMACPP_PYTHON_IMAGE_NAME: llamacpp-python
LLAMACPP_PYTHON_VULKAN_IMAGE_NAME: llamacpp-python-vulkan
LLAMACPP_PYTHON_CUDA_IMAGE_NAME: llamacpp-python-cuda
LLAMACPP_PYTHON_IMAGE_NAME: llamacpp_python
LLAMACPP_PYTHON_VULKAN_IMAGE_NAME: llamacpp_python_vulkan
LLAMACPP_PYTHON_CUDA_IMAGE_NAME: llamacpp_python_cuda
CHROMADB_IMAGE_NAME: chromadb
RAG_IMAGE_NAME: rag
jobs:
build-and-push-llamacpp-python-cuda-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -26,7 +26,7 @@ jobs:
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Build llamacpp_python cuda
id: build_llamacpp_python_cuda
@ -54,7 +54,7 @@ jobs:
tags: ${{ steps.build_llamacpp_python_cuda.outputs.tags }}
build-and-push-llamacpp-python-vulkan-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -64,7 +64,7 @@ jobs:
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency
@ -98,7 +98,7 @@ jobs:
tags: ${{ steps.build_llamacpp_python_vulkan.outputs.tags }}
build-and-push-llamacpp-python-base-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -108,7 +108,7 @@ jobs:
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency
run: |
@ -141,7 +141,7 @@ jobs:
tags: ${{ steps.build_llamacpp_python_base.outputs.tags }}
build-and-push-rag-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -151,7 +151,7 @@ jobs:
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency
run: |
@ -184,13 +184,13 @@ jobs:
tags: ${{ steps.build_rag.outputs.tags }}
build-and-push-chromadb-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency
run: |
@ -223,13 +223,13 @@ jobs:
tags: ${{ steps.build_chromadb.outputs.tags }}
build-and-push-codegen-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency
@ -263,13 +263,13 @@ jobs:
tags: ${{ steps.build_codegen_image.outputs.tags }}
build-and-push-chatbot-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency
@ -303,13 +303,13 @@ jobs:
tags: ${{ steps.build_chatbot_image.outputs.tags }}
build-and-push-summarizer-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
# required for multi-arch builds
- name: Install qemu dependency

View File

@ -14,9 +14,9 @@ concurrency:
jobs:
mirror-repository:
if: github.repository == 'containers/ai-lab-recipes'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
@ -30,7 +30,7 @@ jobs:
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{

73
.github/workflows/model_converter.yaml vendored Normal file
View File

@ -0,0 +1,73 @@
name: Update quay.io/ai-lab model images
on:
pull_request:
branches:
- main
paths:
- 'convert_models/**'
- '!convert_models/README.md'
- '.github/workflows/model_converter.yaml'
push:
branches:
- main
paths:
- 'convert_models/**'
- '!convert_models/README.md'
- '.github/workflows/model_converter.yaml'
workflow_dispatch:
env:
REGISTRY: quay.io
REGISTRY_ORG: ai-lab
jobs:
model-converter-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
strategy:
matrix:
include:
- platforms: linux/amd64,linux/arm64
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2.13
with:
image: ${{ env.REGISTRY_ORG }}/model-converter
platforms: ${{ matrix.platforms }}
tags: latest
containerfiles: convert_models/Containerfile
context: convert_models
- name: Login to Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/podman-login@v1.7
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}

View File

@ -1,113 +0,0 @@
name: Update quay.io/ai-lab model images
on:
schedule: # schedule the job to run at 12 AM daily
- cron: '0 0 * * *'
workflow_dispatch:
env:
REGISTRY: quay.io/ai-lab
MODEL_CONVERTER_IMAGE_NAME: model-converter
MISTRAL_MODEL_IMAGE_NAME: mistral-7b-instruct
MISTRAL_LABEL: v0.1.Q4_K_M.gguf
MISTRAL_MODEL_URL: https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
jobs:
build-and-push-model-converter-image:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# recover disk space
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
# required for multi-arch builds
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build model-converter image
id: build_convert_models_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.MODEL_CONVERTER_IMAGE_NAME }}
tags: latest
platforms: linux/amd64, linux/arm64
context: models/convert_models
containerfiles: ./models/convert_models/Containerfile
- name: Login to quay.io
uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push model-converter image
id: push_convert_models_image
uses: redhat-actions/push-to-registry@v2
with:
registry: ${{ env.REGISTRY }}
image: ${{ steps.build_convert_models_image.outputs.image }}
tags: ${{ steps.build_convert_models_image.outputs.tags }}
build-and-push-mistral-model-image:
if: contains( github.event.pull_request.labels.*.name, 'hold-tests')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# need enough disk space to download model
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
# required for multi-arch builds
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build mistral model image
id: build_mistral_model_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.MISTRAL_MODEL_IMAGE_NAME }}
tags: latest
platforms: linux/amd64, linux/arm64
context: models
labels: |
${{ env.MISTRAL_LABEL }}
build-args: |
MODEL_URL=${{ env.MISTRAL_MODEL_URL }}
containerfiles: ./models/Containerfile
- name: Login to quay.io
uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push mistral model image
id: push_mistral_model_image
uses: redhat-actions/push-to-registry@v2
with:
registry: ${{ env.REGISTRY }}
image: ${{ steps.build_mistral_model_image.outputs.image }}
tags: ${{ steps.build_mistral_model_image.outputs.tags }}

View File

@ -5,14 +5,18 @@ on:
branches:
- main
paths:
- ./model_servers/**
- 'model_servers/**'
- 'models/Makefile'
- .github/workflows/model_servers.yaml
push:
branches:
- main
paths:
- ./model_servers/
- 'model_servers/**'
- 'models/Makefile'
- .github/workflows/model_servers.yaml
tags:
- '*'
workflow_dispatch:
@ -21,30 +25,48 @@ env:
REGISTRY_ORG: containers
jobs:
build-and-push-image:
model-servers-buid-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
strategy:
matrix:
include:
- image_name: llamacpp_python
model: mistral
model: granite
flavor: base
directory: llamacpp_python
platforms: linux/amd64,linux/arm64
no_gpu: 1
- image_name: llamacpp_python_cuda
model: mistral
- image_name: llamacpp-python-cuda
model: granite
flavor: cuda
directory: llamacpp_python
platforms: linux/amd64,linux/arm64
no_gpu: 0
- image_name: llamacpp-python-vulkan-amd
model: granite
flavor: vulkan/amd64
directory: llamacpp_python
platforms: linux/amd64
cuda: 1
no_gpu: 0
- image_name: llamacpp-python-vulkan-arm
model: granite
flavor: vulkan/arm64
directory: llamacpp_python
platforms: linux/arm64
no_gpu: 0
- image_name: whispercpp
model: whisper-small
flavor: base
directory: whispercpp
platforms: linux/amd64,linux/arm64
no_gpu: 1
runs-on: ubuntu-latest
- image_name: object_detection_python
model: facebook-detr-resnet-101
flavor: base
directory: object_detection_python
platforms: linux/amd64,linux/arm64
no_gpu: 1
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -59,12 +81,17 @@ jobs:
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Set up Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
- name: Build Image
id: build_image
@ -72,19 +99,14 @@ jobs:
with:
image: ${{ env.REGISTRY }}/${{ github.repository_owner}}/${{ matrix.image_name }}
platforms: ${{ matrix.platforms }}
tags: latest
tags: latest ${{ github.ref_type == 'tag' && github.ref_name || '' }}
containerfiles: ./model_servers/${{ matrix.directory }}/${{ matrix.flavor }}/Containerfile
context: model_servers/${{ matrix.directory }}/
- name: Download model
working-directory: ./model_servers/${{ matrix.directory }}/
working-directory: ./models
run: make download-model-${{ matrix.model }}
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
- name: Install python dependencies
working-directory: ./model_servers/${{ matrix.directory }}/
run: make install

94
.github/workflows/models.yaml vendored Normal file
View File

@ -0,0 +1,94 @@
name: Update quay.io/ai-lab model images
on:
schedule: # schedule the job to run at 12 AM daily
- cron: '0 0 * * *'
pull_request:
branches:
- main
paths:
- .github/workflows/models.yaml
push:
branches:
- main
paths:
- .github/workflows/models.yaml
workflow_dispatch:
env:
REGISTRY: quay.io
REGISTRY_ORG: ai-lab
jobs:
models-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
strategy:
matrix:
include:
- image_name: mistral-7b-code-16k-qlora
label: Q4_K_M
url: https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/resolve/main/mistral-7b-code-16k-qlora.Q4_K_M.gguf
platforms: linux/amd64,linux/arm64
- image_name: mistral-7b-instruct
label: Q4_K_M
url: https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.gguf
platforms: linux/amd64,linux/arm64
- image_name: merlinite-7b-lab
label: Q4_K_M
url: https://huggingface.co/instructlab/merlinite-7b-lab-GGUF/resolve/main/merlinite-7b-lab-Q4_K_M.gguf
platforms: linux/amd64,linux/arm64
- image_name: granite-7b-lab
label: Q4_K_M
url: https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf
platforms: linux/amd64,linux/arm64
- image_name: whisper-small
url: https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin
platforms: linux/amd64,linux/arm64
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2.13
with:
image: ${{ env.REGISTRY_ORG }}/${{ matrix.image_name }}
platforms: ${{ matrix.platforms }}
labels: |
${{ matrix.label }}
build-args: |
MODEL_URL=${{ matrix.url }}
tags: latest
containerfiles: ./models/Containerfile
context: models
- name: Login to Container Registry
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
uses: redhat-actions/podman-login@v1.7
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push image
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}

89
.github/workflows/object_detection.yaml vendored Normal file
View File

@ -0,0 +1,89 @@
name: Object Detection
on:
pull_request:
branches:
- main
paths:
- ./recipes/computer_vision/object_detection/**
- .github/workflows/object_detection.yaml
push:
branches:
- main
paths:
- ./recipes/computer_vision/object_detection/**
- .github/workflows/object_detection.yaml
workflow_dispatch:
env:
REGISTRY: ghcr.io
REGISTRY_ORG: containers
RECIPE_NAME: object_detection
RECIPE_TYPE: computer_vision
IMAGE_NAME: object_detection_client
jobs:
object-detection-client-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
services:
registry:
image: registry:2.8.3
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2.13
with:
image: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/${{ env.IMAGE_NAME }}
tags: latest
platforms: linux/amd64,linux/arm64
containerfiles: ./recipes/${{ env.RECIPE_TYPE }}/${{ env.RECIPE_NAME }}/app/Containerfile
context: recipes/${{ env.RECIPE_TYPE }}/${{ env.RECIPE_NAME }}/app
- name: Set up Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
- name: Install Dependencies
working-directory: ./recipes/${{ env.RECIPE_TYPE }}/${{ env.RECIPE_NAME }}
run: make install
- name: Download model
working-directory: ./models
run: make download-model-facebook-detr-resnet-101
- name: Run Functional Tests
shell: bash
run: make functional-tests
working-directory: ./recipes/${{ env.RECIPE_TYPE }}/${{ env.RECIPE_NAME }}
- name: Login to Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/podman-login@v1.7
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Image
id: push_image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}

View File

@ -5,16 +5,16 @@ on:
branches:
- main
paths:
- ./recipes/common/Makefile.common
- ./recipes/natural_language_processing/rag/**
- .github/workflows/rag.yaml
- 'recipes/common/Makefile.common'
- 'recipes/natural_language_processing/rag/**'
- '.github/workflows/rag.yaml'
push:
branches:
- main
paths:
- ./recipes/common/Makefile.common
- ./recipes/natural_language_processing/rag/**
- .github/workflows/rag.yaml
- 'recipes/common/Makefile.common'
- 'recipes/natural_language_processing/rag/**'
- '.github/workflows/rag.yaml'
workflow_dispatch:
@ -23,9 +23,9 @@ env:
IMAGE_NAME: rag
jobs:
build-and-push-image:
rag-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -40,7 +40,7 @@ jobs:
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
@ -58,7 +58,7 @@ jobs:
context: recipes/natural_language_processing/${{ env.IMAGE_NAME }}/app
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
@ -67,8 +67,8 @@ jobs:
run: make install
- name: Download model
working-directory: ./recipes/natural_language_processing/${{ env.IMAGE_NAME }}
run: make download-model-mistral
working-directory: ./models
run: make download-model-granite
- name: Run Functional Tests
shell: bash

View File

@ -23,9 +23,9 @@ env:
IMAGE_NAME: summarizer
jobs:
build-and-push-image:
summarizer-build-and-push:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
@ -35,7 +35,7 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Install qemu dependency
run: |
@ -53,7 +53,7 @@ jobs:
context: recipes/natural_language_processing/${{ env.IMAGE_NAME }}/app
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
@ -62,8 +62,8 @@ jobs:
run: make install
- name: Download model
working-directory: ./recipes/natural_language_processing/${{ env.IMAGE_NAME }}
run: make download-model-mistral
working-directory: ./models
run: make download-model-granite
- name: Run Functional Tests
shell: bash

94
.github/workflows/test-trace-steps.yaml vendored Normal file
View File

@ -0,0 +1,94 @@
# To run locally
# act -W .github/workflows/test-trace-steps.yaml --container-architecture linux/amd64 -b ci/logs:/logs
name: Test Workflow
on:
pull_request:
branches:
- main
paths:
- .github/workflows/test-trace-steps.yaml
workflow_dispatch:
jobs:
test-build:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
pip install --no-cache-dir opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation
- name: Download OpenTelemetry Collector Contrib
run: |
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.103.0/otelcol-contrib_0.103.0_linux_amd64.tar.gz
tar -xvf otelcol-contrib_0.103.0_linux_amd64.tar.gz
- name: Write secrets to files
run: |
echo "${{ secrets.ROSA_OTEL_CACERT }}" > /tmp/ca.crt
echo "${{ secrets.ROSA_OTEL_SERVER_CRT }}" > /tmp/server.crt
echo "${{ secrets.ROSA_OTEL_SERVER_KEY }}" > /tmp/server.key
- name: Configure OpenTelemetry Collector
run: |
echo '
receivers:
otlp:
protocols:
grpc:
http:
exporters:
otlphttp:
endpoint: "${{ secrets.ROSA_OTEL_ENDPOINT }}"
tls:
insecure: false
cert_file: /tmp/server.crt
key_file: /tmp/server.key
ca_file: /tmp/ca.crt
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug, otlphttp]
' > otel-collector-config.yaml
- name: Run OpenTelemetry Collector
run: |
./otelcol-contrib --config otel-collector-config.yaml > otel-collector.log 2>&1 &
- name: Start job trace
run: |
export WORKFLOW_NAME="test-trace"
export JOB_NAME="test-build"
export TRACE_ACTION="start"
python ci/trace-steps.py
- name: Build
run: |
echo "Simulating build step..."
sleep 2
- name: Test
run: |
echo "Simulating test step..."
sleep 2
- name: End job trace
run: |
export WORKFLOW_NAME="test-trace"
export JOB_NAME="test-build"
export TRACE_ACTION="end"
python ci/trace-steps.py
- name: Display OpenTelemetry Collector Logs
run: cat otel-collector.log

View File

@ -1,10 +1,10 @@
name: Testing Framework
on:
schedule: # schedule the job to run every hour
- cron: '0 * * * *'
workflow_dispatch:
schedule: # schedule the job to run once a day
- cron: '0 0 * * *'
#workflow_dispatch:
# pull_request: ## temporary for debugging development purposes
# branches:
@ -13,7 +13,7 @@ on:
env:
TF_VAR_aws_region: "eu-west-2"
TF_VAR_aws_ami_owners: '["125523088429"]'
TF_VAR_aws_ami_name: '["Fedora-Cloud-Base-*"]'
TF_VAR_aws_ami_name: '["Fedora-Cloud-Base-39*"]'
TF_VAR_aws_volume_size: 100
TF_VAR_aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@ -28,13 +28,13 @@ concurrency:
jobs:
integration-tests:
if: github.repository == 'containers/ai-lab-recipes'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
aws_image_type: t3a.medium
aws_image_type: t3a.medium
aws_ami_architecture: x86_64
- arch: arm64
aws_image_type: m7g.medium
@ -44,20 +44,25 @@ jobs:
aws_ami_architecture: x86_64
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
path: main
ref: 'main'
- name: Set up Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
- name: Checkout terraform module
id: checkout-module
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7
with:
repository: containers/terraform-test-environment-module
path: terraform-test-environment-module
ref: 'main'
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3.0.0
uses: hashicorp/setup-terraform@v3.1.2
with:
terraform_version: "1.7.5"
terraform_wrapper: false
@ -73,7 +78,7 @@ jobs:
env:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}
- name: Terraform Output
id: terraform-output
run: |
@ -84,31 +89,26 @@ jobs:
- name: Ansible Collections
run: ansible-galaxy install -r ./provision/requirements.yml
working-directory: ./main/recipes/natural_language_processing/chatbot
working-directory: ./recipes/natural_language_processing/chatbot
- name: Provision
run: |
ansible-playbook ./main/recipes/natural_language_processing/chatbot/provision/playbook.yml \
ansible-playbook ./recipes/natural_language_processing/chatbot/provision/playbook.yml \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }}
env:
ANSIBLE_HOST_KEY_CHECKING: false
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
- name: Install Dependencies
working-directory: ./main/recipes/natural_language_processing/chatbot
working-directory: ./recipes/natural_language_processing/chatbot
run: make install
- name: Run Integration Tests
working-directory: ./main/recipes/natural_language_processing/chatbot
working-directory: ./recipes/natural_language_processing/chatbot
run: make integration-tests
env:
URL: ${{ steps.terraform-output.outputs.url }}
- name: Destroy Test Environment
id: down
if: always()
@ -117,11 +117,11 @@ jobs:
env:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
@ -131,7 +131,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
release-images:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: integration-tests
if: success()
strategy:
@ -154,11 +154,11 @@ jobs:
env:
SOURCE_REGISTRY: ghcr.io/containers
TARGET_REGISTRY: quay.io/ai-lab
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
@ -171,7 +171,12 @@ jobs:
if: github.repository == 'containers-mirror/ai-lab-recipes'
runs-on: ubuntu-22.04-2core
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.11'
- name: chatbot
working-directory: ./recipes/natural_language_processing/chatbot
@ -180,7 +185,7 @@ jobs:
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{

154
.github/workflows/training-e2e.yaml vendored Normal file
View File

@ -0,0 +1,154 @@
name: traning E2E
on:
schedule: # schedule the job to run every day at midnight
- cron: '0 12 * * *'
pull_request:
branches:
- main
paths:
- .github/workflows/training-e2e.yaml
- ./training/**
workflow_dispatch:
env:
TF_VAR_aws_region: "eu-west-2"
TF_VAR_aws_ami_owners: '["309956199498"]'
TF_VAR_aws_ami_name: '["*RHEL-9.4*"]'
TF_VAR_aws_volume_size: 500
TF_VAR_aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
e2e:
if: github.repository == 'containers/ai-lab-recipes' && !contains(github.event.pull_request.labels.*.name, 'hold-tests')
runs-on: ubuntu-24.04
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- arch: amd64
aws_image_type: g5.8xlarge
image_name: nvidia-bootc
aws_ami_architecture: x86_64
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
path: main
- name: Checkout terraform module
id: checkout-module
uses: actions/checkout@v4.1.7
with:
repository: containers/terraform-test-environment-module
path: terraform-test-environment-module
ref: 'main'
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3.1.2
with:
terraform_version: "1.7.5"
terraform_wrapper: false
- name: Init
run: terraform init
working-directory: terraform-test-environment-module
- name: Bootstrap
id: up
run: terraform apply -auto-approve -lock=false
working-directory: terraform-test-environment-module
env:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}
- name: Terraform Output
id: terraform-output
run: |
echo "id=$(terraform output id | xargs)" >> $GITHUB_OUTPUT
echo "url=$(terraform output host | xargs)" >> $GITHUB_OUTPUT
echo "ssh_public_key=$(terraform output ssh_public_key | xargs)" >> $GITHUB_OUTPUT
echo "pem_filename=$(terraform output pem_filename | xargs)" >> $GITHUB_OUTPUT
working-directory: terraform-test-environment-module
- name: Ansible Collections
run: ansible-galaxy install -r ./tests/provision/requirements.yml
working-directory: ./main/training
- name: Provision
run: |
ansible-playbook ./main/training/tests/provision/playbook.yml \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }} \
--extra-vars "image_name=${{ matrix.image_name }}" \
--extra-vars "ssh_public_key='${{ steps.terraform-output.outputs.ssh_public_key }}'" \
--extra-vars "registry_user=${{ secrets.REGISTRY_USER }}" \
--extra-vars "registry_password=${{ secrets.REGISTRY_PASSWORD }}"
env:
ANSIBLE_CONFIG: ./main/training/tests/ansible.cfg
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3.18
# timeout-minutes: 20
# with:
# detached: true
# limit-access-to-actor: false
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3.18
timeout-minutes: 60
with:
detached: true
limit-access-to-actor: false
- name: Run tests
run: |
ansible-playbook ./main/training/tests/e2e-tests/playbook.yml \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }} \
--extra-vars "HF_TOKEN=${{ secrets.HF_TOKEN }}" \
--extra-vars "image_name=${{ matrix.image_name }}" \
--extra-vars "ssh_public_key='${{ steps.terraform-output.outputs.ssh_public_key }}'" \
--extra-vars "registry_user=${{ secrets.REGISTRY_USER }}" \
--extra-vars "registry_password=${{ secrets.REGISTRY_PASSWORD }}"
env:
ANSIBLE_CONFIG: ./main/training/tests/ansible.cfg
# This should exist in the final workflow
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3.18
# timeout-minutes: 15
# with:
# detached: true
# limit-access-to-actor: false
- name: Destroy Test Environment
id: down
if: always()
run: terraform destroy -auto-approve -lock=false
working-directory: terraform-test-environment-module
env:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"text": "${{ github.workflow }} workflow status: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

247
.github/workflows/training_bootc.yaml vendored Normal file
View File

@ -0,0 +1,247 @@
name: Training Bootc image builds
on:
push:
branches: [ main ]
paths:
- 'training/**'
- '.github/workflows/training_bootc.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
env:
REGISTRY: quay.io
REGISTRY_ORG: ai-lab
REGION: us-east-1
jobs:
start-runner:
name: Start self-hosted EC2 runner
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.REGION }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ec2-image-id: ami-0154957ba4ce98784
ec2-instance-type: m7i.12xlarge
subnet-id: subnet-0b1e1d94240813658
security-group-id: sg-055105753f5e8bd83
nvidia-bootc-builder-image:
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
strategy:
matrix:
include:
- image_name: nvidia-builder
context: training/nvidia-bootc
arch: amd64
runs-on: ${{ needs.start-runner.outputs.label }}
needs: start-runner
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.7
- name: mkdir root/.docker directory
run: |
mkdir -p ~/.docker
- name: Login to Container Registry
run: podman login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ env.REGISTRY }}
- name: generate a ssh key - USER SHOULD INJECT THEIR OWN AND REBUILD IF THEY USE THIS IMAGE
run: |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N ""
- name: Build Image
id: build_image
run: make driver-toolkit ARCH=${{ matrix.arch }}
working-directory: ${{ matrix.context }}
- name: tag image as nvidia-builder
run: podman tag ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/driver-toolkit:latest ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/${{ matrix.image_name}}:latest
- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
registry: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}
image: driver-toolkit
tags: latest
- name: push the nvidia-builder image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ matrix.image_name}}
tags: latest
registry: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"text": "${{ github.workflow }} workflow status: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
nvidia-bootc-image:
strategy:
matrix:
include:
- image_name: nvidia-bootc
driver_version: "550.54.15"
context: training/nvidia-bootc
arch: amd64
runs-on: ${{ needs.start-runner.outputs.label }}
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
needs: [ nvidia-bootc-builder-image, start-runner ]
steps:
- uses: actions/checkout@v4.1.7
- name: mkdir root/.docker directory
run: |
mkdir -p ~/.docker
- name: generate a ssh key - USER SHOULD INJECT THEIR OWN AND REBUILD IF THEY USE THIS IMAGE and overwrite the existing one
run: |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" <<<y
- name: Login to Container Registry
run: podman login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ env.REGISTRY }}
- name: generate the local OCI assets
run: |
cd training
make -j vllm
make -j deepspeed
make -j instruct-nvidia
- name: Build Image
id: build_image
run: make bootc DRIVER_VERSION=${{ matrix.driver_version }} ARCH=${{ matrix.arch }} SSH_PUBKEY=~/.ssh/id_rsa.pub
working-directory: ${{ matrix.context }}
- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ matrix.image_name }}
tags: latest
registry: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"text": "${{ github.workflow }} workflow status: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
bootc-images:
strategy:
matrix:
include:
- image_name: intel-bootc
context: training/intel-bootc
arch: amd64
gpu: intel
- image_name: amd-bootc
context: training/amd-bootc
arch: amd64
gpu: amd
if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ${{ needs.start-runner.outputs.label }}
needs: [ start-runner, nvidia-bootc-builder-image ]
continue-on-error: true
steps:
- uses: actions/checkout@v4.1.7
- name: mkdir root/.docker directory
run: |
mkdir -p ~/.docker
- name: Login to Container Registry
run: podman login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ env.REGISTRY }}
- name: generate the local OCI assets
run: |
cd training
make -j vllm
make -j deepspeed
make -j instruct-${{ matrix.gpu}}
- name: Build Image
id: build_image
run: make bootc ARCH=${{ matrix.arch }} INSTRUCTLAB_IMAGE=${{env.REGISTRY}}/${{env.REGISTRY_ORG}}/instruct-${{ matrix.gpu }}:latest
working-directory: ${{ matrix.context }}
- name: Push image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/push-to-registry@v2.8
with:
image: ${{ matrix.image_name }}
tags: latest
registry: ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}
- name: Publish Job Results to Slack
id: slack
if: always()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"text": "${{ github.workflow }} workflow status: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
stop-runner:
name: Stop self-hosted EC2 runner
needs:
- start-runner
- bootc-images
- nvidia-bootc-image
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

7
.gitignore vendored
View File

@ -6,6 +6,13 @@ port_check.lock
models/*
!models/Makefile
!models/README.md
!models/download_hf_models.py
convert_models/converted_models
recipes/common/bin/*
*/.venv/
**/venv/**
training/cloud/examples
training/instructlab/instructlab
vector_dbs/milvus/volumes/milvus/*
.idea
**/volumes/**

View File

@ -1 +1 @@
* @MichaelClifford @rhatdan @sallyom @lmilbaum @cgwalters
* @MichaelClifford @rhatdan @sallyom @cgwalters @Gregory-Pereira @jeffmaury

View File

@ -44,13 +44,13 @@ application:
containerfile: ./base/Containerfile
model-service: true
backend:
- llama
- llama-cpp
arch:
- arm64
- amd64
ports:
- 8001
image: quay.io/ai-lab/llamacppp-python:latest
image: quay.io/ai-lab/llamacpp_python:latest
- name: streamlit-chat-app
contextdir: .
containerfile: app/Containerfile
@ -99,9 +99,9 @@ After creating your new recipe by adding the files above you might be asking you
## Contributing New Model Servers
There are a number of options out there for model servers and we want to ensure that we provide developers with a variety of vetted options for the model server that will meet there applications needs.
There are a number of options out there for model servers and we want to ensure that we provide developers with a variety of vetted options for the model server that will meet their application's needs.
Deciding which model server is right for a particular use case primarily comes down to the kind of model you want to use (LLM, Object Detection, Data Classification, etc..) and the resources available (GPU, CPU, Cloud, Local).
Deciding which model server is right for a particular use case primarily comes down to the kind of model you want to use (LLM, Object Detection, Data Classification, etc.) and the resources available (GPU, CPU, Cloud, Local).
### Adding a New Model Server

View File

@ -1,5 +1,7 @@
# AI Lab Recipes
![](/assets/ai_lab_recipes_logo.png)
This repo contains recipes for building and running containerized AI and LLM
Applications with Podman.
@ -22,11 +24,11 @@ default. This server can be used for various generative AI applications with var
However, each sample application can be paired with a variety of model servers.
Learn how to build and run the llamacpp_python model server by following the
[llamacpp_python model server README.](/model_servers/llamacpp_python/README.md).
[llamacpp_python model server README](/model_servers/llamacpp_python/README.md).
## Current Recipes
Recipes consist to at least two components: A model server and an AI application.
Recipes consist of at least two components: A model server and an AI application.
The model server manages the model, and the AI application provides the specific
logic needed to perform some specific task such as chat, summarization, object
detection, etc.
@ -49,5 +51,20 @@ For example, learn how to run the [chatbot recipe here](./recipes/natural_langua
Images for many sample applications and models are available in `quay.io`. All
currently built images are tracked in
[ai-lab-recipes-images.md](./ai-lab-recipes-images.md)
[ailab-images.md](./ailab-images.md)
## [Training](./training/README.md)
Linux Operating System Bootable containers enabled for AI Training
## Setting Up Git Hooks
To install our standard git hooks, run the following command:
```sh
./install-hooks.sh
```
### pre-commit hook
Ensures that `training/ilab-wrapper/ilab` is duplicated into `training/nvidia-bootc/duplicated/ilab-wrapper/ilab`

View File

@ -1,19 +1,34 @@
## Images (x86_64, aarch64) currently built from GH Actions in this repository
## Model Server Images (amd64, arm64) currently built from GH Actions in this repository
- quay.io/ai-lab/llamacpp-python:latest
- quay.io/ai-lab/llamacpp_python:latest
- quay.io/ai-lab/llamacpp-python-cuda:latest
- quay.io/ai-lab/llamacpp-python-vulkan:latest
- quay.io/redhat-et/locallm-object-detection-server:latest
## Recipe Images (amd64, arm64)
- quay.io/ai-lab/summarizer:latest
- quay.io/ai-lab/chatbot:latest
- quay.io/ai-lab/rag:latest
- quay.io/ai-lab/codegen:latest
- quay.io/ai-lab/chromadb:latest
- quay.io/redhat-et/locallm-object-detection-client:latest
- quay.io/redhat-et/locallm-object-detection-server:latest
## Model Images (x86_64, aarch64)
## Dependency images (amd64)
Images used in the `Bootc` aspect of this repo or tooling images
- quay.io/ai-lab/chromadb:latest
- quay.io/ai-lab/model-converter:latest
## Model Images (amd64, arm64)
- quay.io/ai-lab/merlinite-7b-lab:latest
- [model download link](https://huggingface.co/instructlab/merlinite-7b-lab-GGUF/resolve/main/merlinite-7b-lab-Q4_K_M.gguf)
- quay.io/ai-lab/granite-7b-lab:latest
- [model download link](https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf)
- quay.io/ai-lab/mistral-7b-instruct:latest
- [model download link](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf)
- quay.io/ai-lab/codellama-7b:latest
- [model download link](https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF/resolve/main/codellama-7b-instruct.Q4_K_M.gguf)
- [model download link](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.gguf)
- quay.io/ai-lab/mistral-7b-code-16k-qlora:latest
- [model download link](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/resolve/main/mistral-7b-code-16k-qlora.Q4_K_M.gguf)
- quay.io/ai-lab/whisper-small:latest
- [model download link](https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin)

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB

BIN
assets/rag_nodejs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

47
ci/trace-steps.py Normal file
View File

@ -0,0 +1,47 @@
import os
import time
from datetime import datetime
from opentelemetry import trace
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor, ConsoleSpanExporter
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
service_name = os.getenv("WORKFLOW_NAME", "default_service")
job_name = os.getenv("JOB_NAME", "default_job")
resource = Resource.create({"service.name": service_name})
trace.set_tracer_provider(TracerProvider(resource=resource))
tracer = trace.get_tracer(__name__)
console_span_processor = BatchSpanProcessor(ConsoleSpanExporter())
trace.get_tracer_provider().add_span_processor(console_span_processor)
# Adding OTLP Span Exporter for actual data export
otlp_exporter = OTLPSpanExporter(endpoint="localhost:4317", insecure=True)
otlp_span_processor = BatchSpanProcessor(otlp_exporter)
trace.get_tracer_provider().add_span_processor(otlp_span_processor)
print("Tracer initialized with service name:", service_name)
def set_start_time():
start_time = datetime.now().timestamp()
with open("/tmp/start_time.txt", "w") as file:
file.write(str(start_time))
print("Start time recorded")
def calculate_duration():
with open("/tmp/start_time.txt", "r") as file:
start_time = float(file.read())
end_time = datetime.now().timestamp()
duration = end_time - start_time
print(f"Total Duration: {duration}s")
with tracer.start_as_current_span(job_name) as span:
span.set_attribute("total_duration_s", duration)
if __name__ == "__main__":
action = os.getenv("TRACE_ACTION", "start")
if action == "start":
set_start_time()
elif action == "end":
calculate_duration()

View File

@ -1,7 +1,10 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
WORKDIR /converter
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
WORKDIR /opt/app-root/src/converter
USER root
RUN chown -R default:root /opt/app-root/src/converter
USER default
RUN git clone https://github.com/ggerganov/llama.cpp.git
RUN cd llama.cpp/ && make
RUN pip install -r llama.cpp/requirements.txt
COPY . /converter/
COPY . /opt/app-root/src/converter/
ENTRYPOINT ["sh", "run.sh"]

View File

@ -1,12 +1,12 @@
# Convert and Quantize Models
Locallm currently relies on [llamacpp](https://github.com/ggerganov/llama.cpp) for its model service backend. Llamacpp requires that model be in a `*.gguf` format.
AI Lab Recipes' default model server is [llamacpp_python](https://github.com/abetlen/llama-cpp-python), which needs models to be in a `*.GGUF` format.
However, most models available on [huggingface](https://huggingface.co/models) are not provided directly as `*.gguf` files. More often they are provided as a set of `*.bin` files with some additional metadata files that are produced when the model is originally trained.
However, most models available on [huggingface](https://huggingface.co/models) are not provided directly as `*.GGUF` files. More often they are provided as a set of `*.bin` or `*.safetensor` files with some additional metadata produced when the model is trained.
There are of course a number of users on huggingface who provide `*gguf` versions of popular models. But this introduces an unnecessary interim dependency as well as possible security or licensing concerns.
There are of course a number of users on huggingface who provide `*.GGUF` versions of popular models. But this introduces an unnecessary interim dependency as well as possible security or licensing concerns.
To avoid these concerns and provide users with the maximum freedom of choice for their models, we provide a tool to quickly and easily convert and quantize a model on huggingface into a `*gguf` format for use with Locallm.
To avoid these concerns and provide users with the maximum freedom of choice for their models, we provide a tool to quickly and easily convert and quantize a model from huggingface into a `*.GGUF` format for use with our `*.GGUF` compatible model servers.
![](/assets/model_converter.png)
@ -19,10 +19,10 @@ podman build -t converter .
## Quantize and Convert
You can run the conversion image directly with Podman in the terminal. You just need to provide it with the huggingface model you want to download, the quantization level you want to use and whether or not you want to keep the raw files after conversion.
You can run the conversion image directly with podman in the terminal. You just need to provide it with the huggingface model name you want to download, the quantization level you want to use and whether or not you want to keep the raw files after conversion. "HF_TOKEN" is optional, it is required for private models.
```bash
podman run -it --rm -v models:/converter/converted_models -e HF_MODEL_URL=<ORG/MODEL_NAME> -e QUANTIZATION=Q4_K_M -e KEEP_ORIGINAL_MODEL="False"
podman run -it --rm -v models:/converter/converted_models -e HF_MODEL_URL=<ORG/MODEL_NAME> -e HF_TOKEN=<YOUR_HF_TOKEN_ID> -e QUANTIZATION=Q4_K_M -e KEEP_ORIGINAL_MODEL="False" converter
```
You can also use the UI shown above to do the same.
@ -33,12 +33,12 @@ streamlit run convert_models/ui.py
## Model Storage and Use
This process writes the models into a Podman volume under a `gguf/` directory and not directly back to the user's host machine (This could be changed in an upcoming update if it is required).
This process writes the models into a podman volume under a `gguf/` directory and not directly back to the user's host machine (This could be changed in an upcoming update if it is required).
If a user wants to access these models to use with the llamacpp model-service, they would simply point their model-service volume mount to the Podman volume created here. For example:
If a user wants to access these models to use with the llamacpp_python model server, they would simply point their model service to the correct podman volume at run time. For example:
```
podman run -it -p 8001:8001 -v models:/locallm/models:Z -e MODEL_PATH=models/gguf/<MODEL_NAME> -e HOST=0.0.0.0 -e PORT=8001 llamacppserver
```bash
podman run -it -p 8001:8001 -v models:/opt/app-root/src/converter/converted_models/gguf:Z -e MODEL_PATH=/gguf/<MODEL_NAME> -e HOST=0.0.0.0 -e PORT=8001 llamacpp_python
```

View File

@ -3,9 +3,11 @@ import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--model")
parser.add_argument("-t", "--token")
args = parser.parse_args()
snapshot_download(repo_id=args.model,
token=args.token,
local_dir=f"converted_models/{args.model}",
local_dir_use_symlinks=True,
cache_dir=f"converted_models/cache")

View File

@ -1,31 +1,32 @@
#! /bin/bash
hf_model_url=${HF_MODEL_URL}
hf_token=${HF_TOKEN:="None"}
model_org=$(echo $hf_model_url | sed -n 's/\(.*\)\/\(.*\)/\1/p')
model_name=$(echo $hf_model_url | sed -n 's/\(.*\)\/\(.*\)/\2/p')
keep_orgi=${KEEP_ORIGINAL_MODEL}
if [ -e "/converter/converted_models/gguf/$model_org-$model_name-${QUANTIZATION}.gguf" ]; then
if [ -e "/opt/app-root/src/converter/converted_models/gguf/$model_org-$model_name-${QUANTIZATION}.gguf" ]; then
echo "$model_org-$model_name-${QUANTIZATION}.gguf already exists... skipping"
exit 0
fi
if [ -e "/converter/converted_models/cache/models--$model_org--$model_name" ]; then
if [ -e "/opt/app-root/src/converter/converted_models/cache/models--$model_org--$model_name" ]; then
echo "$hf_model_url present in cache... skipping download"
fi
echo "Downloading $hf_model_url"
python download_huggingface.py --model $hf_model_url
python llama.cpp/convert.py /converter/converted_models/$hf_model_url
python llama.cpp/convert-hf-to-gguf.py /converter/converted_models/$hf_model_url
mkdir -p /converter/converted_models/gguf/
llama.cpp/quantize /converter/converted_models/$hf_model_url/ggml-model-f16.gguf /converter/converted_models/gguf/$model_org-$model_name-${QUANTIZATION}.gguf ${QUANTIZATION}
rm -rf /converter/converted_models/$model_org
python download_huggingface.py --model $hf_model_url --token $hf_token
python llama.cpp/examples/convert_legacy_llama.py /opt/app-root/src/converter/converted_models/$hf_model_url
python llama.cpp/convert_hf_to_gguf.py /opt/app-root/src/converter/converted_models/$hf_model_url
mkdir -p /opt/app-root/src/converter/converted_models/gguf/
llama.cpp/llama-quantize /opt/app-root/src/converter/converted_models/$hf_model_url/ggml-model-f16.gguf /opt/app-root/src/converter/converted_models/gguf/$model_org-$model_name-${QUANTIZATION}.gguf ${QUANTIZATION}
rm -rf /opt/app-root/src/converter/converted_models/$model_org
if [ $keep_orgi = "False" ]; then
rm -rf /converter/converted_models/cache
rm -rf /opt/app-root/src/converter/converted_models/cache
fi
echo "Converted and quantized model written to /converter/converted_models/gguf/$model_org-$model_name.gguf"
echo "$ ls /converter/converted_models/gguf/"
ls /converter/converted_models/gguf/
echo "Converted and quantized model written to /opt/app-root/src/converter/converted_models/gguf/$model_org-$model_name.gguf"
echo "$ ls /opt/app-root/src/converter/converted_models/gguf/"
ls /opt/app-root/src/converter/converted_models/gguf/

View File

@ -22,6 +22,9 @@ with col2:
model_name = st.text_input(label="Enter a huggingface model url to convert",
placeholder="org/model_name")
token_id = st.text_input(label="Enter your huggingface token (optional)",
help="huggingface token is required for private model"
) or "None"
keep_files = st.checkbox("Keep huggingface model files after conversion?")
submit_button = st.button(label="submit")
if submit_button:
@ -31,7 +34,8 @@ if submit_button:
"-it",
"--rm",
"-v", f"{volume}:/converter/converted_models",
"-e", f"HF_MODEL_URL={model_name}" ,
"-e", f"HF_MODEL_URL={model_name}",
"-e", f"HF_TOKEN={token_id}",
"-e", f"QUANTIZATION={quantization}",
"-e", f"KEEP_ORIGINAL_MODEL={keep_files}",
"converter"],stdout=subprocess.PIPE)

BIN
data/fake_meeting.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,98 @@
from langchain.embeddings.sentence_transformer import SentenceTransformerEmbeddings
from langchain_openai import ChatOpenAI
from langchain.chains import LLMChain
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
import matplotlib.pyplot as plt
import os
from scipy.spatial.distance import cosine
import streamlit as st
model_service = os.getenv("MODEL_ENDPOINT",
"http://localhost:8001")
model_service = f"{model_service}/v1"
embedding_model = os.getenv("EMBEDDING_MODEL",
"BAAI/bge-base-en-v1.5")
def get_embedding(string, e):
embeddings = e.embed_query(string)
return embeddings
st.title("📊 Create Custom LLM Eval Set")
if "Question" not in st.session_state:
st.session_state["Question"] = "What is the Higgs Boson?"
if "Answers" not in st.session_state:
st.session_state["Answers"] = {}
st.session_state["Answers"]["Right_Answer_1"] = "The Higgs boson, sometimes called the Higgs particle, is an elementary particle in the Standard Model of particle physics produced by the quantum excitation of the Higgs field, one of the fields in particle physics theory"
st.session_state["Answers"]["Wrong_Answer_1"] = "Alan Turing was the first person to conduct substantial research in the field that he called machine intelligence."
st.session_state["Question"] = st.text_input(label="Question", value=st.session_state["Question"])
col1,col2,col3 = st.columns(3)
with col1:
st.session_state["Answers"]["Right_Answer_1"] = st.text_input("Right Answer 1",
value=st.session_state["Answers"]["Right_Answer_1"])
with col2:
st.session_state["Answers"]["Right_Answer_2"] = st.text_input("Right Answer 2")
with col3:
st.session_state["Answers"]["Right_Answer_3"] = st.text_input("Right Answer 3")
col1,col2,col3 = st.columns(3)
with col1:
st.session_state["Answers"]["Wrong_Answer_1"] = st.text_input("Wrong Answer 1",
value=st.session_state["Answers"]["Wrong_Answer_1"])
with col2:
st.session_state["Answers"]["Wrong_Answer_2"] = st.text_input("Wrong Answer 2")
with col3:
st.session_state["Answers"]["Wrong_Answer_3"] = st.text_input("Wrong Answer 3")
text = {k:[v] for (k,v) in st.session_state["Answers"].items() if v != ""}
text["Question"] = [st.session_state["Question"]]
e = SentenceTransformerEmbeddings(model_name=embedding_model)
for t in text.keys():
text[t].append(get_embedding(text[t][0],e))
answer_embedding = text["Question"][1]
for t in text.keys():
question_embedding = text[t][1]
distance = cosine(answer_embedding, question_embedding)
text[t].append(round(distance,3))
distances = [text[key][2] for key in text.keys()]
ones = [1]* len(distances)
fig = plt.figure()
plt.vlines(1,.001,1)
plt.scatter(ones, distances)
for key in text.keys():
plt.annotate(key,(1, text[key][2]))
plt.xticks([])
plt.ylabel("Cosine Similarity")
st.pyplot(fig)
submit = st.button("Check Against Model")
if submit:
llm = ChatOpenAI(base_url=model_service,
api_key="sk-no-key-required")
prompt = ChatPromptTemplate.from_messages([
("system", "You are world class technical advisor."),
("user", "{input}")])
chain = LLMChain(llm=llm,
prompt=prompt,
verbose=False,)
response = chain.invoke(st.session_state["Question"])
st.session_state["Answers"]["LLM Response"] = response["text"]
st.markdown(st.session_state["Answers"]["LLM Response"])
st.rerun()

15
eval/promptfoo/README.md Normal file
View File

@ -0,0 +1,15 @@
# LLM Evaluation with Promptfoo
We are using the [Promptfoo.dev](https://www.promptfoo.dev/) project for LLM model evaluation.
```
podman build -t promptfoo eval/promptfoo/build
```
Make sure you are running an LLM before starting the promptfoo container.
```
podman run -it -p 15500:15500 -v <LOCAL/PATH/TO/>/locallm/eval/promptfoo/evals/:/promptfoo/evals:ro promptfoo
```
Go to `http://0.0.0.0:15500/setup/` to set up your tests.

View File

@ -0,0 +1,8 @@
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal:1-63.1725851021
WORKDIR /promptfoo
RUN npm install promptfoo
ENV PROMPTFOO_DISABLE_TELEMETRY=1
RUN mkdir evals
ENV PROMPTFOO_CONFIG_DIR=/promptfoo/evals
COPY promptfooconfig.yaml /promptfoo
ENTRYPOINT [ "npx", "promptfoo@latest", "view", "--yes" ]

View File

@ -0,0 +1,31 @@
# This configuration compares LLM output of 2 prompts x 2 GPT models across 3 test cases.
# Learn more: https://promptfoo.dev/docs/configuration/guide
description: 'My first eval'
prompts:
- "Write a tweet about {{topic}}"
- "Write a very concise, funny tweet about {{topic}}"
providers:
- openai:gpt-3.5-turbo-0613
- openai:gpt-4
tests:
- vars:
topic: bananas
- vars:
topic: avocado toast
assert:
# For more information on assertions, see https://promptfoo.dev/docs/configuration/expected-outputs
- type: icontains
value: avocado
- type: javascript
value: 1 / (output.length + 1) # prefer shorter outputs
- vars:
topic: new york city
assert:
# For more information on model-graded evals, see https://promptfoo.dev/docs/configuration/expected-outputs/model-graded
- type: llm-rubric
value: ensure that the output is funny

View File

@ -0,0 +1 @@
Directory to store evaluation runs locally

View File

@ -1,9 +0,0 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
WORKDIR /locallm
RUN git clone https://github.com/michaelclifford/llama.cpp.git
RUN cd llama.cpp/ && make
ENV DATA=data/data/shakespeare.txt
ENV MODEL_FILE=data/llama-2-7b-chat.Q5_K_S.gguf
ENV NEW_MODEL=shakespeare-lora.gguf
COPY run_finetune.sh /locallm/
ENTRYPOINT ["sh", "run_finetune.sh"]

View File

@ -1,59 +0,0 @@
# Finetuning - with Locallm (MacOS)
In some cases it will be useful for a developers to updated the base language model they are using (like Llama2) with some custom data of their own. In order to do this they can "finetune" the model by partially retraining it with their custom data set. There are a number of ways to do this, and they vary in complexity and computational resource requirements. Here we will continue to rely on the [llama.cpp](https://github.com/ggerganov/llama.cpp) package and do LoRA (Low-Rank Adaption) fine tuning which often requires fewer resources than other fine tuning methods.
### Use the container image
We have created a pre-built container image for running the finetuning and producing a new model on a mac. The image can be found at [quay.io/michaelclifford/finetunellm](quay.io/michaelclifford/finetunellm).
```bash
podman pull quay.io/michaelclifford/finetunellm
```
It only requires 2 things from a user to start fine tuning. The data they wish to finetune with, and the Llama based model they want to finetune (the current implementation requires a variant of the Llama model).
### Make the data accessible
This is the trickiest part of the current demo and I'm hoping to find a smoother approach moving forward. That said, there are many ways to get data into and out of pods and containers, but here we will rely on exposing a directory on our local machine as a volume for the container.
This also assumes that `<location/of/your/data/>` contains the following 2 files.
* `llama-2-7b-chat.Q5_K_S.gguf`
* [link](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_S.gguf)
* `data/shakespeare.txt`
* [link](https://raw.githubusercontent.com/brunoklein99/deep-learning-notes/master/shakespeare.txt)
### Run the image
```bash
podman run --rm -it -v <location/of/your/data/>:/locallm/data/ finetunellm
```
This will run 10 iterations of LoRA finetuning and generate a new model that can be exported and used in another chat application. I'll caution that 10 iterations is likely insufficient to see a real change in the model outputs, but it serves here for demo purposes.
### Export the model
Now that we have our finedtuned model we will want to move it out of the Podman machine and onto our local host for use by another application. Again, I'm sure there are better ways to do this long term.
Here we will rely on Podman's copy function to move the model.
```bash
podman cp <container name>:<model_file> <location/of/your/data>
```
### Customize the finetuning
If you would like to use a different model or dataset, you can replace the training data file in `data/` as well as the `.gguf` model file. However, for now llama.cpp finetuning requires a Llama variant model to be used.
To change the data and model used you can set the following environment variables when starting a new container.
* `DATA=data/data/<new-data-file>`
* `MODEL_FILE=data/<new-model-file.gguf>`
* `NEW_MODEL=<name-of-new-finetuned-model.gguf>`
```bash
podman run -it -v <location/of/your/data/>:/locallm/data/ \
-e MODEL_FILE=data/<new-model-file.gguf> \
-e DATA=darta/data/<new-data-file> \
-e NEW_MODEL=<name-of-new-finetuned-model.gguf>
finetunellm
```

View File

@ -1,23 +0,0 @@
#! /bin/bash
llama.cpp/finetune \
--model-base $MODEL_FILE \
--checkpoint-in chk-lora-llama-7b-chat-Q5-shakespeare-LATEST.gguf \
--checkpoint-out chk-lora-llama-7b-chat-Q5-shakespeare-ITERATION.gguf \
--lora-out lora-llama-7b-chat-Q5-shakespeare-ITERATION.bin \
--train-data $DATA \
--save-every 10 \
--threads 10 --adam-iter 10 --batch 4 --ctx 64 \
--use-checkpointing \
llama.cpp/export-lora \
--model-base $MODEL_FILE \
--model-out $NEW_MODEL \
--lora-scaled lora-llama-7b-chat-Q5-shakespeare-LATEST.bin 1.0
echo "Fine Tuning Complete...
Please move trained model to desired location
Example: 'podman cp <container name>:<model_file> .' from the host machine"
bash

13
hooks/pre-commit Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
SOURCE_FILE="training/ilab-wrapper/ilab"
DEST_FILE="training/nvidia-bootc/duplicated/ilab-wrapper/ilab"
if [[ -f "$SOURCE_FILE" ]]; then
mkdir -p "$(dirname "$DEST_FILE")"
cp "$SOURCE_FILE" "$DEST_FILE"
git add "$DEST_FILE"
else
echo "Source file $SOURCE_FILE does not exist. Aborting commit."
exit 1
fi

8
install-hooks.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
HOOKS_DIR="hooks"
GIT_HOOKS_DIR=".git/hooks"
cp "$HOOKS_DIR/pre-commit" "$GIT_HOOKS_DIR/pre-commit"
echo "Hooks installed successfully."

View File

@ -1,6 +1,8 @@
CONTAINER_TOOL ?= podman
REGISTRY ?= quay.io
REGISTRY_ORG ?= ai-lab
COMPONENT ?= model_servers
CHAT_FORMAT ?=
BIND_MOUNT_OPTIONS := ro
OS := $(shell uname -s)
@ -10,7 +12,7 @@ endif
.PHONY: build
build:
podman build --squash-all --build-arg $(PORT) -t $(IMAGE) . -f base/Containerfile
podman build --squash-all --build-arg PORT=$(PORT) -t $(IMAGE) . -f base/Containerfile
.PHONY: install
install:
@ -35,7 +37,15 @@ clean:
.PHONY: run
run:
cd ../../models && \
podman run -it -d -p $(PORT):$(PORT) -v ./$(MODEL_NAME):$(MODELS_PATH)/$(MODEL_NAME):$(BIND_MOUNT_OPTIONS) -e MODEL_PATH=$(MODELS_PATH)/$(MODEL_NAME) -e HOST=0.0.0.0 -e PORT=$(PORT) $(IMAGE)
podman run -it \
-d \
-p $(PORT):$(PORT) \
-v ./$(MODEL_NAME):$(MODELS_PATH)/$(MODEL_NAME):$(BIND_MOUNT_OPTIONS) \
-e MODEL_PATH=$(MODELS_PATH)/$(MODEL_NAME) \
-e HOST=0.0.0.0 \
-e PORT=$(PORT) \
$(CHAT_FORMAT:%=-e CHAT_FORMAT=${CHAT_FORMAT}) \
$(IMAGE)
.PHONY: podman-clean
podman-clean:

View File

@ -1,5 +1,6 @@
APP := llamacpp_python
PORT ?= 8001
CHAT_FORMAT ?=
include ../common/Makefile.common
@ -9,20 +10,22 @@ CUDA_IMAGE := $(REGISTRY)/$(REGISTRY_ORG)/$(COMPONENT)/$(APP)_cuda:latest
VULKAN_IMAGE := $(REGISTRY)/$(REGISTRY_ORG)/$(COMPONENT)/$(APP)_vulkan:latest
MODELS_PATH := /locallm/models
MODEL_NAME ?= mistral-7b-instruct-v0.1.Q4_K_M.gguf
MODEL_NAME ?= granite-7b-lab-Q4_K_M.gguf
.Phony: all
all: build download-model-mistral run
all: build download-model-granite run
.PHONY: build-cuda
build-cuda:
podman build --squash-all -t $(CUDA_IMAGE) . -f cuda/Containerfile
"${CONTAINER_TOOL}" build --squash-all -t $(CUDA_IMAGE) . -f cuda/Containerfile
.PHONY: build-vulkan
build-vulkan:
podman build --squash-all -t $(VULKAN_IMAGE) . -f vulkan/Containerfile
.PHONY: build-vulkan-amd64 build-vulkan-arm64
build-vulkan-amd64:
"${CONTAINER_TOOL}" build --squash-all -t $(VULKAN_IMAGE) . -f vulkan/amd64/Containerfile
build-vulkan-arm64:
"${CONTAINER_TOOL}" build --squash-all -t $(VULKAN_IMAGE) . -f vulkan/arm64/Containerfile
.PHONY: download-model-mistral # default model
download-model-mistral:
cd ../../models && \
make MODEL_NAME=mistral-7b-instruct-v0.1.Q4_K_M.gguf MODEL_URL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf -f Makefile download-model
.PHONY: download-model-granite # default model
download-model-granite:
cd ../../models/ && \
make download-model-granite

View File

@ -1,53 +1,56 @@
# Llamacpp_Python Model Sever
# Llamacpp_Python Model Server
The llamacpp_python model server images are based on the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) project that provides python bindings for [llama.cpp](https://github.com/ggerganov/llama.cpp). This provides us with a python based and OpenAI API compatible model server that can run LLM's of various sizes locally across Linux, Windows or Mac.
This model server requires models to be converted from their original format, typically a set of `*.bin` or `*.safetensor` files into a single GGUF formatted file. Many models are available in GGUF format already on [huggingface.co](https://huggingface.co). You can also use the [model converter utility](../../convert_models/) available in this repo to convert models yourself.
This model server requires models to be converted from their original format, typically a set of `*.bin` or `*.safetensor` files into a single GGUF formatted file. Many models are available in GGUF format already on [huggingface.co](https://huggingface.co). You can also use the [model converter utility](../../convert_models/) available in this repo to convert models yourself.
## Image Options
We currently provide 3 options for the llamacpp_python model server:
* [Base](#base)
We currently provide 3 options for the llamacpp_python model server:
* [Base](#base)
* [Cuda](#cuda)
* [Vulkan (experimental)](#vulkan-experimental)
* [Vulkan (experimental)](#vulkan-experimental)
### Base
The [base image](../llamacpp_python/base/Containerfile) is the standard image that works for both arm64 and amd64 environments. However, it does not includes any hardware acceleration and will run with CPU only. If you use the base image, make sure that your container runtime has sufficient resources to run the desired model(s).
The [base image](../llamacpp_python/base/Containerfile) is the standard image that works for both arm64 and amd64 environments. However, it does not includes any hardware acceleration and will run with CPU only. If you use the base image, make sure that your container runtime has sufficient resources to run the desired model(s).
To build the base model service image:
```bash
make -f Makefile build
make build
```
To pull the base model service image:
```bash
podman pull quay.io/ai-lab/llamacpp-python
podman pull quay.io/ai-lab/llamacpp_python
```
### Cuda
The [Cuda image](../llamacpp_python/cuda/Containerfile) include all the extra drivers necessary to run our model server with Nvidia GPUs. This will significant speed up the models response time over CPU only deployments.
The [Cuda image](../llamacpp_python/cuda/Containerfile) include all the extra drivers necessary to run our model server with Nvidia GPUs. This will significant speed up the models response time over CPU only deployments.
To Build the the Cuda variant image:
```bash
make -f Makefile build-cuda
make build-cuda
```
To pull the base model service image:
```bash
podman pull quay.io/ai-lab/llamacpp-python-cuda
podman pull quay.io/ai-lab/llamacpp_python_cuda
```
**IMPORTANT!**
To run the Cuda image with GPU acceleration, you need to install the correct [Cuda drivers](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#driver-installation) for your system along with the [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#). Please use the links provided to find installation instructions for your system.
To run the Cuda image with GPU acceleration, you need to install the correct [Cuda drivers](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#driver-installation) for your system along with the [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#). Please use the links provided to find installation instructions for your system.
Once those are installed you can use the container toolkit CLI to discover your Nvidia device(s).
Once those are installed you can use the container toolkit CLI to discover your Nvidia device(s).
```bash
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
```
@ -57,35 +60,37 @@ Finally, you will also need to add `--device nvidia.com/gpu=all` to your `podman
### Vulkan (experimental)
The [Vulkan image](../llamacpp_python/vulkan/Containerfile) is experimental, but can be used for gaining partial GPU access on an M-series Mac, significantly speeding up model response time over a CPU only deployment. This image requires that your podman machine provider is "applehv" and that you use krunkit instead of vfkit. Since these tools are not currently supported by podman desktop this image will remain "experimental".
The [Vulkan](https://docs.vulkan.org/guide/latest/what_is_vulkan.html) image ([amd64](../llamacpp_python/vulkan/amd64/Containerfile)/[arm64](../llamacpp_python/vulkan/arm64/Containerfile)) is experimental, but can be used for gaining partial GPU access on an M-series Mac, significantly speeding up model response time over a CPU only deployment. This image requires that your podman machine provider is "applehv" and that you use krunkit instead of vfkit. Since these tools are not currently supported by podman desktop this image will remain "experimental".
To build the Vulkan model service variant image:
```bash
make -f Makefile build-vulkan
```
| System Architecture | Command |
|---|---|
| amd64 | make build-vulkan-amd64 |
| arm64 | make build-vulkan-arm64 |
To pull the base model service image:
```bash
podman pull quay.io/ai-lab/llamacpp-python-vulkan
podman pull quay.io/ai-lab/llamacpp_python_vulkan
```
## Download Model(s)
There are many models to choose from these days, most of which can be found on [huggingface.co](https://huggingface.co). In order to use a model with the llamacpp_python model server, it must be in GGUF format. You can either download pre-converted GGUF models directly or convert them yourself with the [model converter utility](../../convert_models/) available in this repo.
One of the more popular Apache-2.0 Licenesed models that we recommend using if you are just getting started is `mistral-7b-instruct-v0.1`. You can use the link below to quickly download a quantized (smaller) GGUF version of this model for use with the llamacpp_python model server.
A well performant Apache-2.0 licensed models that we recommend using if you are just getting started is
`granite-7b-lab`. You can use the link below to quickly download a quantized (smaller) GGUF version of this model for use with the llamacpp_python model server.
Download URL: [https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf)
Download URL: [https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf](https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf)
Place all models in the [models](../../models/) directory.
You can use this snippet below to download the default model:
```bash
make -f Makefile download-model-mistral
make download-model-granite
```
Or you can use the generic `download-models` target from the `/models` directory to download any model file from huggingface:
@ -93,7 +98,7 @@ Or you can use the generic `download-models` target from the `/models` directory
```bash
cd ../../models
make MODEL_NAME=<model_name> MODEL_URL=<model_url> -f Makefile download-model
# EX: make MODEL_NAME=mistral-7b-instruct-v0.1.Q4_K_M.gguf MODEL_URL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf -f Makefile download-model
# EX: make MODEL_NAME=granite-7b-lab-Q4_K_M.gguf MODEL_URL=https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf -f Makefile download-model
```
@ -104,32 +109,35 @@ make MODEL_NAME=<model_name> MODEL_URL=<model_url> -f Makefile download-model
To deploy the LLM server you must specify a volume mount `-v` where your models are stored on the host machine and the `MODEL_PATH` for your model of choice. The model_server is most easily deploy from calling the make command: `make -f Makefile run`. Of course as with all our make calls you can pass any number of the following variables: `REGISTRY`, `IMAGE_NAME`, `MODEL_NAME`, `MODEL_PATH`, and `PORT`.
```bash
podman run --rm -it \
podman run --rm -d \
-p 8001:8001 \
-v Local/path/to/locallm/models:/locallm/models:ro \
-e MODEL_PATH=models/mistral-7b-instruct-v0.1.Q4_K_M.gguf
-e HOST=0.0.0.0
-e PORT=8001
llamacpp_python \
-e MODEL_PATH=models/granite-7b-lab-Q4_K_M.gguf \
-e HOST=0.0.0.0 \
-e PORT=8001 \
-e MODEL_CHAT_FORMAT=openchat \
llamacpp_python
```
or with Cuda image
```bash
podman run --rm -it \
--device nvidia.com/gpu=all
podman run --rm -d \
--device nvidia.com/gpu=all \
-p 8001:8001 \
-v Local/path/to/locallm/models:/locallm/models:ro \
-e MODEL_PATH=models/mistral-7b-instruct-v0.1.Q4_K_M.gguf
-e HOST=0.0.0.0
-e PORT=8001
llamacpp_python \
-e MODEL_PATH=models/granite-7b-lab-Q4_K_M.gguf \
-e HOST=0.0.0.0 \
-e PORT=8001 \
-e MODEL_CHAT_FORMAT=openchat \
llamacpp_python
```
### Multiple Model Service:
To enable dynamic loading and unloading of different models present on your machine, you can start the model service with a `CONFIG_PATH` instead of a `MODEL_PATH`.
Here is an example `models_config.json` with two quantization variants of mistral-7B.
Here is an example `models_config.json` with two model options.
```json
{
@ -137,24 +145,24 @@ Here is an example `models_config.json` with two quantization variants of mistra
"port": 8001,
"models": [
{
"model": "models/mistral-7b-instruct-v0.1.Q4_K_M.gguf",
"model_alias": "mistral_Q4",
"chat_format": "mistral",
"model": "models/granite-7b-lab-Q4_K_M.gguf",
"model_alias": "granite",
"chat_format": "openchat",
},
{
"model": "models/mistral-7b-instruct-v0.1.Q5_K_M.gguf",
"model_alias": "mistral_Q5",
"chat_format": "mistral",
"model": "models/merlinite-7b-lab-Q4_K_M.gguf",
"model_alias": "merlinite",
"chat_format": "openchat",
},
]
}
```
Now run the container with the specified config file.
Now run the container with the specified config file.
```bash
podman run --rm -it -d \
podman run --rm -d \
-p 8001:8001 \
-v Local/path/to/locallm/models:/locallm/models:ro \
-e CONFIG_PATH=models/<config-filename> \
@ -169,4 +177,4 @@ Running tests
```bash
make -f Makefile test
```
```

View File

@ -1,6 +1,9 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
WORKDIR /locallm
COPY src .
RUN pip install --no-cache-dir --verbose -r ./requirements.txt
USER root
RUN dnf install -y gcc-toolset-13-gcc gcc-toolset-13-gcc-c++
USER 1001
RUN CC="/opt/rh/gcc-toolset-13/root/usr/bin/gcc" CXX="/opt/rh/gcc-toolset-13/root/usr/bin/g++" pip install --no-cache-dir --verbose -r ./requirements.txt
EXPOSE 8001
ENTRYPOINT [ "sh", "./run.sh" ]

View File

@ -1,7 +1,10 @@
FROM quay.io/opendatahub/workbench-images:cuda-ubi9-python-3.9-20231206
USER root
RUN dnf install -y gcc-toolset-13-gcc gcc-toolset-13-gcc-c++
USER 1001
WORKDIR /locallm
COPY src .
ENV CMAKE_ARGS="-DLLAMA_CUBLAS=on -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF -DLLAMA_F16C=OFF"
ENV CMAKE_ARGS="-DGGML_CUDA=on -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF -DLLAMA_F16C=OFF"
ENV FORCE_CMAKE=1
RUN pip install --no-cache-dir -r ./requirements.txt
RUN CC="/opt/rh/gcc-toolset-13/root/usr/bin/gcc" CXX="/opt/rh/gcc-toolset-13/root/usr/bin/g++" pip install --no-cache-dir -r ./requirements.txt
ENTRYPOINT [ "sh", "run.sh" ]

View File

@ -1,2 +1,3 @@
llama-cpp-python[server]==0.2.61
llama-cpp-python[server]==0.2.90
transformers==4.41.2
pip==24.0

View File

@ -4,8 +4,21 @@ if [ ${CONFIG_PATH} ] || [[ ${MODEL_PATH} && ${CONFIG_PATH} ]]; then
exit 0
fi
if [ "${MODEL_HF_PRETRAINED_MODEL}" == "None" ]; then
MODEL_HF_PRETRAINED_MODEL=""
fi
if [ ${MODEL_PATH} ]; then
python -m llama_cpp.server --model ${MODEL_PATH} --host ${HOST:=0.0.0.0} --port ${PORT:=8001} --n_gpu_layers ${GPU_LAYERS:=0} --clip_model_path ${CLIP_MODEL_PATH:=None} --chat_format ${MODEL_CHAT_FORMAT:="llama-2"}
python -m llama_cpp.server \
--model ${MODEL_PATH} \
--host ${HOST:=0.0.0.0} \
--port ${PORT:=8001} \
--n_gpu_layers ${GPU_LAYERS:=0} \
--clip_model_path ${CLIP_MODEL_PATH:=None} \
--chat_format ${MODEL_CHAT_FORMAT:=llama-2} \
${PRETRAINED_MODEL_PATH:=} \
${MODEL_HF_PRETRAINED_MODEL:+--hf_pretrained_model_name_or_path ${MODEL_HF_PRETRAINED_MODEL}} \
--interrupt_requests ${INTERRUPT_REQUESTS:=False}
exit 0
fi

View File

@ -13,7 +13,7 @@ else:
IMAGE_NAME = os.environ['IMAGE_NAME']
if not 'MODEL_NAME' in os.environ:
MODEL_NAME = 'mistral-7b-instruct-v0.1.Q4_K_M.gguf'
MODEL_NAME = 'granite-7b-lab-Q4_K_M.gguf'
else:
MODEL_NAME = os.environ['MODEL_NAME']

View File

@ -23,7 +23,7 @@
"This notebook assumes that the playground image is running locally. Once built, you can use the below to start the model service image. \n",
"\n",
"```bash\n",
"podman run -it -p 8000:8000 -v <YOUR-LOCAL-PATH>/locallm/models:/locallm/models:Z -e MODEL_PATH=models/mistral-7b-instruct-v0.1.Q4_K_M.gguf playground\n",
"podman run -it -p 8000:8000 -v <YOUR-LOCAL-PATH>/locallm/models:/locallm/models:Z -e MODEL_PATH=models/mistral-7b-instruct-v0.2.Q4_K_M.gguf playground\n",
"```"
]
},
@ -203,7 +203,7 @@
"from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler\n",
"\n",
"\n",
"llm = OpenAI(temperature=0.9,model_name=\"llama2\", base_url=\"http://localhost:8000/v1\", \n",
"llm = OpenAI(temperature=0.9,model_name=\"instructlab/granite-7b-lab\", base_url=\"http://localhost:8000/v1\", \n",
" openai_api_key=\"sk-no-key-required\", streaming=True,\n",
" callbacks=[StreamingStdOutCallbackHandler()])\n",
"text = \"What would be a good company name for a company that makes colorful socks?\"\n",

View File

@ -0,0 +1,17 @@
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
USER 0
RUN dnf install -y python3-dnf-plugin-versionlock
RUN dnf install -y mesa-vulkan-drivers-24.1.2-3.el9.x86_64
RUN dnf versionlock mesa-vulkan-drivers-24.1.2-3.el9.x86_64
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN dnf install -y git cmake ninja-build gcc gcc-c++
RUN dnf copr enable -y ligenix/enterprise-sandbox epel-9-x86_64
RUN dnf install -y vulkan-headers vulkan-tools
USER 1001
WORKDIR /locallm
COPY src .
RUN pip install --upgrade pip
ENV CMAKE_ARGS="-DLLAMA_VULKAN=on"
ENV FORCE_CMAKE=1
RUN pip install --no-cache-dir --upgrade -r /locallm/requirements.txt
ENTRYPOINT [ "sh", "run.sh" ]

View File

@ -1,9 +1,11 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
USER 0
RUN dnf install -y python3-dnf-plugin-versionlock && \
dnf install -y \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
dnf copr enable -y slp/mesa-krunkit epel-9-aarch64 && \
dnf install -y mesa-vulkan-drivers-23.3.3-101.el9.aarch64 && \
dnf versionlock mesa-vulkan-drivers-23.3.3-101.el9.aarch64 && \
dnf install -y mesa-vulkan-drivers-24.1.2-101.el9.aarch64 && \
dnf versionlock mesa-vulkan-drivers-24.1.2-101.el9.aarch64 && \
dnf install -y git cmake ninja-build gcc gcc-c++ vulkan-loader-devel vulkan-tools
USER 1001
WORKDIR /locallm

View File

@ -1,35 +1,33 @@
APP := object_detection_python
PORT ?= 8000
include ../common/Makefile.common
IMAGE_NAME ?= $(REGISTRY_ORG)/$(COMPONENT)/$(APP):latest
IMAGE := $(REGISTRY)/$(IMAGE_NAME)
CUDA_IMAGE := $(REGISTRY)/$(REGISTRY_ORG)/$(COMPONENT)/$(APP)_cuda:latest
VULKAN_IMAGE := $(REGISTRY)/$(REGISTRY_ORG)/$(COMPONENT)/$(APP)_vulkan:latest
REGISTRY ?= ghcr.io
REGISTRY_ORG ?= containers
MODEL_NAME ?= facebook/detr-resnet-101
MODELS_DIR := /models
MODELS_DIR := /app/models
include ../common/Makefile.common
IMAGE_NAME ?= $(REGISTRY_ORG)/$(APP):latest
IMAGE := $(REGISTRY)/$(IMAGE_NAME)
# Run override required because of the multi-directory models and model_path vs models_dir
.PHONY: run
run:
cd ../../models && \
podman run -it -d -p $(PORT):$(PORT) -v ./$(MODEL_NAME):$(MODELS_DIR)/$(MODEL_NAME):$(BIND_MOUNT_OPTIONS) -e MODEL_PATH=$(MODELS_DIR)/$(MODEL_NAME) -e HOST=0.0.0.0 -e PORT=$(PORT) $(IMAGE)
.PHONY: all
all: build download-model-facebook-detr-resnet-101 run
.PHONY: download-model-facebook-detr-resnet-101
download-model-facebook-detr-resnet-101:
pip install -r ../../convert_models/requirements.txt
cd ../../convert_models/ && \
python3.11 download_huggingface.py -m facebook/detr-resnet-101
cp -r ../../convert_models/converted_models/facebook ../../models/
cd ../../models && \
make download-model-facebook-detr-resnet-101
.PHONY: test
test:
$(MAKE) download-model-facebook-detr-resnet-101
ln -s ../../models/detr-resnet-101 ./
PORT=$(PORT) MODEL_NAME=$(MODEL_NAME) MODELS_PATH=$(MODELS_PATH) IMAGE=$(IMAGE) PULL_ALWAYS=0 pytest -s -vvv
pip install -r ../../convert_models/requirements.txt
cp -r ../../models/facebook ./
REGISTRY=$(REGISTRY) MODEL_NAME=$(MODEL_NAME) MODELS_DIR=$(MODELS_DIR) IMAGE_NAME=$(IMAGE_NAME) PORT=$(PORT) pytest -s -vvv

View File

@ -0,0 +1,52 @@
# Object_Detection_Python Model Server
The object_detection_python model server is a simple [FastAPI](https://fastapi.tiangolo.com/) application written specifically for use in the [object_detection recipe](../../recipes/computer_vision/object_detection/) with "DEtection TRansformer" (DETR) models. It relies on huggingface's transformer package for `AutoImageProcessor` and `AutoModelforObjectDetection` to process image data and to make inferences respectively.
Currently, the server only implements a single endpoint, `/detection`, that expects an image in bytes and returns an image with labeled bounding boxes and the probability scores of each bounding box.
## Build Model Server
To build the object_detection_python model server image from this directory:
```bash
podman build -t object_detection_python . base/Containerfile
```
or
```bash
make build
```
## Download Model(s)
You can download models from [huggingface.co](https://huggingface.co/) for this model server. This model server is intended to be used with "DEtection TRansformer" (DETR) models. The default model we've used and validated is [facebook/detr-resnet-101](https://huggingface.co/facebook/detr-resnet-101).
You can download a copy of this model into your `models/` with the make command below.
```bash
make download-model-facebook-detr-resnet-101
```
or any model with
```bash
cd ../../models/ && \
python download_hf_models.py -m <MODEL>
```
## Deploy Model Server
The model server relies on a volume mount to the localhost to access the model files. It also employs environment variables to dictate the model used and where its served. You can start your model server using the following `make` command from the [`model_servers/object_detection_python`](../../../model_servers/object_detection_python) directory, which will be set with reasonable defaults:
```bash
make run
```
or
```bash
podman run -it -d -p 8000:8000 \
-v <LOCAL/PATH/TO/MODLES>/facebook/detr-resnet-101:/models/facebook/detr-resnet-101:ro \
-e MODEL_PATH=/models/facebook/detr-resnet-101 \
-e HOST=0.0.0.0 \
-e PORT=8000 \
ghcr.io/ai-lab/model_servers/object_detection_python:latest
```

View File

@ -1,9 +1,8 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
ARG PORT=8000
WORKDIR /app
COPY src/requirements.txt .
COPY src .
RUN pip install --upgrade pip && \
pip install --no-cache-dir --upgrade -r requirements.txt
COPY src/object_detection_server.py .
EXPOSE $PORT
ENTRYPOINT [ "uvicorn", "object_detection_server:app", "--host", "0.0.0.0" ]
ENTRYPOINT [ "sh", "./run.sh" ]

View File

@ -11,7 +11,7 @@ import shutil
app = FastAPI()
model = os.getenv("MODEL_PATH", default="facebook/detr-resnet-101")
model = os.getenv("MODEL_PATH", default="/app/models/facebook/detr-resnet-101")
revision = os.getenv("MODEL_REVISION", default="no_timm")
if os.path.isfile(model):
@ -30,6 +30,10 @@ else:
class Item(BaseModel):
image: bytes
@app.get("/health")
def tests_alive():
return {"alive": True}
@app.post("/detection")
def detection(item: Item):
b64_image = item.image

View File

@ -0,0 +1,8 @@
fastapi
pillow
pydantic
requests
transformers
torch
uvicorn
timm

View File

@ -1,36 +1,55 @@
annotated-types==0.6.0
anyio==4.3.0
certifi==2024.2.2
annotated-types==0.7.0
anyio==4.4.0
certifi==2024.6.2
charset-normalizer==3.3.2
click==8.1.7
fastapi==0.110.1
filelock==3.13.4
fsspec==2024.3.1
h11==0.14.0
huggingface-hub==0.22.2
click==8.1.8
dnspython==2.6.1
email_validator==2.2.0
fastapi==0.111.1
fastapi-cli==0.0.7
filelock==3.15.4
fsspec==2024.6.1
h11==0.16.0
httpcore==1.0.9
httptools==0.6.4
httpx==0.27.2
huggingface-hub==0.23.4
idna==3.7
Jinja2==3.1.3
Jinja2==3.1.6
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
mpmath==1.3.0
networkx==3.3
numpy==1.26.4
packaging==24.0
numpy==2.0.1
orjson==3.10.18
packaging==24.1
pillow==10.3.0
pydantic==2.6.4
pydantic_core==2.16.3
PyYAML==6.0.1
regex==2023.12.25
requests==2.31.0
safetensors==0.4.3
pydantic==2.7.4
pydantic_core==2.18.4
Pygments==2.18.0
python-dotenv==1.0.1
python-multipart==0.0.20
PyYAML==6.0.2
regex==2024.5.15
requests==2.32.3
rich==13.7.1
safetensors==0.4.5
shellingham==1.5.4
sniffio==1.3.1
starlette==0.37.2
sympy==1.12
timm==0.9.16
tokenizers==0.15.2
torch==2.2.2
torchvision==0.17.2
tqdm==4.66.2
transformers==4.39.3
typing_extensions==4.11.0
urllib3==2.2.1
uvicorn==0.29.0
sympy==1.12.1
timm==1.0.15
tokenizers==0.19.1
torch==2.3.1
torchvision==0.18.1
tqdm==4.66.5
transformers==4.41.2
typer==0.12.5
typing_extensions==4.12.2
ujson==5.10.0
urllib3==2.2.3
uvicorn==0.30.6
uvloop==0.19.0
watchfiles==0.22.0
websockets==12.0

View File

@ -0,0 +1,9 @@
#!/bin/bash
if [ ${MODEL_PATH} ]; then
PORT=${PORT} MODEL_PATH=${MODEL_PATH} uvicorn object_detection_server:app --port ${PORT:=8000} --host ${HOST:=0.0.0.0}
exit 0
fi
echo "Please set either a MODEL_PATH"
exit 1

View File

@ -0,0 +1,46 @@
import pytest_container
import os
REGISTRY = os.getenv("REGISTRY", "ghcr.io")
IMAGE_NAME = os.getenv("IMAGE_NAME", "containers/object_detection_python:latest")
MODEL_NAME = os.getenv("MODEL_NAME", "facebook/detr-resnet-101")
MODELS_DIR = os.getenv("MODELS_DIR", "/app/models")
MODEL_PATH = f"{MODELS_DIR}/{MODEL_NAME}"
PORT = os.getenv("PORT", 8000)
if type(PORT) == str:
try:
PORT = int(PORT)
except:
PORT = 8000
MS = pytest_container.Container(
url=f"containers-storage:{REGISTRY}/{IMAGE_NAME}",
volume_mounts=[
pytest_container.container.BindMount(
container_path=f"{MODEL_PATH}",
host_path=f"./{MODEL_NAME}",
flags=["ro"]
)
],
extra_environment_variables={
"MODEL_PATH": f"{MODEL_PATH}",
"HOST": "0.0.0.0",
"PORT": f"{PORT}",
"IMAGE_NAME": f"{IMAGE_NAME}",
"REGISTRY": f"{REGISTRY}"
},
forwarded_ports=[
pytest_container.PortForwarding(
container_port=PORT,
host_port=PORT
)
],
)
def pytest_generate_tests(metafunc):
pytest_container.auto_container_parametrize(metafunc)
def pytest_addoption(parser):
pytest_container.add_logging_level_options(parser)

View File

@ -0,0 +1,8 @@
pip==24.0
pytest-container==0.4.0
pytest-selenium==4.1.0
pytest-testinfra==10.1.0
pytest==8.1.1
requests==2.31.0
selenium==4.19.0
tenacity==8.2.3

View File

@ -0,0 +1,12 @@
import pytest_container
from .conftest import MS
import tenacity
CONTAINER_IMAGES = [MS]
def test_etc_os_release_present(auto_container: pytest_container.container.ContainerData):
assert auto_container.connection.file("/etc/os-release").exists
@tenacity.retry(stop=tenacity.stop_after_attempt(5), wait=tenacity.wait_exponential())
def test_alive(auto_container: pytest_container.container.ContainerData, host):
host.run_expect([0],f"curl http://localhost:{auto_container.forwarded_ports[0].host_port}",).stdout.strip()

View File

@ -14,7 +14,7 @@ MODEL_NAME ?= ggml-small.bin
.PHONY: all
all: build download-model-whisper-small run
.PHONY: download-model-whisper-small # small .bin model type testing
.PHONY: download-model-whisper-small
download-model-whisper-small:
cd ../../models && \
make MODEL_NAME=ggml-small.bin MODEL_URL=https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin -f Makefile download-model
make download-model-whisper-small

View File

@ -19,6 +19,10 @@ COPY --from=builder /app /app
COPY --from=mwader/static-ffmpeg:6.1.1 /ffmpeg /bin/
COPY --from=mwader/static-ffmpeg:6.1.1 /ffprobe /bin/
COPY src /app/
COPY --chown=0:0 --chmod=755 src /app
RUN chown 1001:1001 /app
USER 1001
ENV AUDIO_FILE=/app/jfk.wav
ENTRYPOINT ["sh", "run.sh"]

View File

@ -1,3 +1,3 @@
#!/bin/bash
./server -tr --model ${MODEL_PATH} --host ${HOST:=0.0.0.0} --port ${PORT:=8001}
./server -tr --model ${MODEL_PATH} --convert --host ${HOST:=0.0.0.0} --port ${PORT:=8001}

View File

@ -1,15 +1,18 @@
# Suggested alternative open AI Models
# https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf (Default)
# https://huggingface.co/instructlab/merlinite-7b-lab-GGUF/resolve/main/merlinite-7b-lab-Q4_K_M.gguf
# https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_S.gguf
# https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf (Default)
# https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.gguf
# https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF/resolve/main/codellama-7b-instruct.Q4_K_M.gguf
# https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin
# podman build --build-arg MODEL_URL=https://... -t quay.io/yourimage .
# podman build --build-arg="MODEL_URL=https://..." -t quay.io/yourimage .
#
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-15
FROM registry.access.redhat.com/ubi9/ubi-micro:9.4-15
# Can be substituted using the --build-arg defined above
ARG MODEL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
ARG MODEL_URL=https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf
# By default the Model Server container image uses the AI Model stored in the model/model.file file.
WORKDIR /model
ADD $MODEL /model/model.file
ADD $MODEL_URL /model/model.file

View File

@ -1,18 +1,51 @@
MODEL_URL ?= https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
MODEL_NAME ?= mistral-7b-instruct-v0.1.Q4_K_M.gguf
CONTAINER_TOOL ?= podman
MODEL_URL ?= https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf
MODEL_NAME ?= granite-7b-lab-Q4_K_M.gguf
REGISTRY ?= quay.io
REGISTRY_ORG ?= ai-lab
COMPONENT = models
IMAGE ?= $(REGISTRY)/$(REGISTRY_ORG)/$(COMPONENT)/llama:latest
IMAGE ?= $(shell tr '[:upper:]' '[:lower:]' <<< $(REGISTRY)/$(REGISTRY_ORG)/$(MODEL_NAME):latest)
.PHONY: build
build:
podman build $${MODEL_URL:+--build-arg MODEL=$${MODEL_URL}} -f Containerfile -t ${IMAGE} .
"${CONTAINER_TOOL}" build $(MODEL_URL:%=--build-arg MODEL_URL=%) -f Containerfile -t ${IMAGE} .
.PHONY: download-model
download-model:
curl -H "Cache-Control: no-cache" -s -S -L -f $(MODEL_URL) -z $(MODEL_NAME) -o $(MODEL_NAME).tmp && \
curl -H "Cache-Control: no-cache" --max-time 900 --retry 2 --retry-delay 15 --connect-timeout 180 --progress-bar -S -L -f $(MODEL_URL) -z $(MODEL_NAME) -o $(MODEL_NAME).tmp && \
mv -f $(MODEL_NAME).tmp $(MODEL_NAME) 2>/dev/null || \
rm -f $(MODEL_NAME).tmp $(MODEL_NAME)
.PHONY: download-model-granite
download-model-granite:
$(MAKE) MODEL_URL=https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf MODEL_NAME=granite-7b-lab-Q4_K_M.gguf download-model
.PHONY: download-model-merlinite
download-model-merlinite:
$(MAKE) MODEL_URL=https://huggingface.co/instructlab/merlinite-7b-lab-GGUF/resolve/main/merlinite-7b-lab-Q4_K_M.gguf MODEL_NAME=merlinite-7b-lab-Q4_K_M.gguf download-model
.PHONY: download-model-whisper-small
download-model-whisper-small:
$(MAKE) MODEL_NAME=ggml-small.bin MODEL_URL=https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin download-model
.PHONY: download-model-mistral
download-model-mistral:
$(MAKE) MODEL_NAME=mistral-7b-instruct-v0.2.Q4_K_M.gguf MODEL_URL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.gguf download-model
.PHONY: download-model-mistral-code
download-model-mistral-code:
$(MAKE) MODEL_NAME=mistral-7b-code-16k-qlora.Q4_K_M.gguf MODEL_URL=https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/resolve/main/mistral-7b-code-16k-qlora.Q4_K_M.gguf download-model
.PHONY: download-model-facebook-detr-resnet-101
download-model-facebook-detr-resnet-101:
python3 -m pip install -r ../convert_models/requirements.txt
cd ../convert_models/ && \
python3 download_huggingface.py -m facebook/detr-resnet-101
cp -r ../convert_models/converted_models/facebook ./
.PHONY: clean
clean:
-rm -f *tmp
-rm -f mistral* ggml-* granite* merlinite*

View File

@ -2,18 +2,18 @@
The models directory stores models and provides automation around downloading models.
Want to try one of our tested models? Try or or all of the following:
Want to try one of our tested models? Try one or all of the following:
```bash
make -f Makefile download-model-llama
make -f Makefile download-model-tiny-llama
make -f Makefile download-model-mistral
make -f Makefile download-model-whisper-small
make -f Makefile download-model-whisper-base
make download-model-granite
make download-model-merlinite
make download-model-mistral
make download-model-mistral-code
make download-model-whisper-small
```
Want to download and run a model you dont see listed? This is supported with the `MODEL_NAME` and `MODEL_URL` params:
Want to download and run a model you don't see listed? This is supported with the `MODEL_NAME` and `MODEL_URL` params:
```bash
make -f Makefile download-model MODEL_URL=https://huggingface.co/andrewcanis/c4ai-command-r-v01-GGUF/resolve/main/c4ai-command-r-v01-Q4_K_S.gguf MODEL_NAME=c4ai-command-r-v01-Q4_K_S.gguf
```
make download-model MODEL_URL=https://huggingface.co/TheBloke/openchat-3.5-0106-GGUF/resolve/main/openchat-3.5-0106.Q4_K_M.gguf MODEL_NAME=openchat-3.5-0106.Q4_K_M.gguf
```

View File

@ -0,0 +1,44 @@
from huggingface_hub import snapshot_download, hf_hub_download ,HfFileSystem
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--model")
parser.add_argument("-o", "--output", default="./models")
parser.add_argument("-q", "--quantization", default="Q4_K_M")
args = parser.parse_args()
gguf = False
safetensor = False
ignore_patterns = ["*.md", ".gitattributes"]
fs = HfFileSystem()
files = fs.ls(args.model, detail=False)
for f in files:
if ".gguf" in f:
gguf = True
break
if ".safetensor" in f:
safetensor = True
break
if gguf:
file_name = [x for x in files if args.quantization in x][0]
file_name_parts = file_name.split("/")
local_dir = f"{args.output}/{file_name_parts[1]}"
hf_hub_download(repo_id=f"{file_name_parts[0]}/{file_name_parts[1]}",
filename=file_name_parts[2],
local_dir=local_dir,
local_dir_use_symlinks=False
)
else:
if safetensor:
ignore_patterns.append("*.bin")
file_name_parts = args.model.split("/")
local_dir = f"{args.output}/{file_name_parts[1]}"
snapshot_download(repo_id=args.model,
local_dir=local_dir,
local_dir_use_symlinks=False,
ignore_patterns=ignore_patterns,
)

View File

@ -0,0 +1,9 @@
SHELL := /bin/bash
APP ?= audio-to-text
PORT ?= 8501
include ../../common/Makefile.common
RECIPE_BINARIES_PATH := $(shell realpath ../../common/bin)
RELATIVE_MODELS_PATH := ../../../models
RELATIVE_TESTS_PATH := ../tests

View File

@ -1,15 +1,15 @@
version: v1.0
application:
type: audio
name: Audio Transcription
description: This is a Streamlit transcription application.
name: Audio Transcription
description: Transcribe audio files via speech recognition.
containers:
- name: whispercpp-server
contextdir: ../../../model_servers/whispercpp
containerfile: ./base/Containerfile
model-service: true
backend:
- llama
backend:
- whisper-cpp
arch:
- arm64
- amd64

View File

@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
WORKDIR /locallm
COPY requirements.txt /locallm/requirements.txt
RUN pip install --upgrade pip && \

View File

@ -8,15 +8,19 @@ st.title(":studio_microphone: Speech Recognition")
st.markdown("Upload an audio file you wish to have translated")
endpoint = os.getenv("MODEL_ENDPOINT", default="http://0.0.0.0:8001")
endpoint = f"{endpoint}/inference"
audio = st.file_uploader("", type=["wav"], accept_multiple_files=False)
endpoint_bearer = os.getenv("MODEL_ENDPOINT_BEARER")
request_kwargs = {}
if endpoint_bearer is not None:
request_kwargs["headers"] = {"Authorization": f"Bearer {endpoint_bearer}"}
audio = st.file_uploader("", type=["wav","mp3","mp4","flac"], accept_multiple_files=False)
# read audio file
if audio:
audio_bytes = audio.read()
st.audio(audio_bytes, format='audio/wav', start_time=0)
files = {'file': audio_bytes}
response = requests.post(endpoint, files=files)
request_kwargs["files"] = {'file': audio_bytes}
response = requests.post(endpoint, **request_kwargs)
response_json = response.json()
st.subheader(f"Translated Text")
st.text_area(label="", value=response_json['text'], height=300)
else:
st.write("Input not provided")
st.write("Input not provided")

View File

@ -0,0 +1,47 @@
# Example: an AI powered sample application is embedded as a systemd service
# via Podman quadlet files in /usr/share/containers/systemd
#
# from recipes/natural_language_processing/audio-to-text, run
# 'make bootc'
FROM quay.io/centos-bootc/centos-bootc:stream9
ARG SSHPUBKEY
# The --build-arg "SSHPUBKEY=$(cat ~/.ssh/id_rsa.pub)" option inserts your
# public key into the image, allowing root access via ssh.
RUN set -eu; mkdir -p /usr/ssh && \
echo 'AuthorizedKeysFile /usr/ssh/%u.keys .ssh/authorized_keys .ssh/authorized_keys2' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \
echo ${SSHPUBKEY} > /usr/ssh/root.keys && chmod 0600 /usr/ssh/root.keys
ARG RECIPE=audio-to-text
ARG MODEL_IMAGE=quay.io/ai-lab/whisper-small:latest
ARG APP_IMAGE=quay.io/ai-lab/${RECIPE}:latest
ARG SERVER_IMAGE=quay.io/ai-lab/whispercpp:latest
ARG TARGETARCH
# Add quadlet files to setup system to automatically run AI application on boot
COPY build/${RECIPE}.kube build/${RECIPE}.yaml /usr/share/containers/systemd
# Because images are prepulled, no need for .image quadlet
# If commenting out the pulls below, uncomment this to track the images
# so the systemd service will wait for the images with the service startup
# COPY build/${RECIPE}.image /usr/share/containers/systemd
# Added for running as an OCI Container to prevent Overlay on Overlay issues.
VOLUME /var/lib/containers
# Setup /usr/lib/containers/storage as an additional store for images.
# Remove once the base images have this set by default.
RUN sed -i -e '/additionalimage.*/a "/usr/lib/containers/storage",' \
/etc/containers/storage.conf && \
mkdir -p /usr/lib/containers/storage
# Prepull the model, model_server & application images to populate the system.
# Use the Containerfile.nocache Containerfile to keep bootc image smaller.
RUN skopeo --debug copy --override-arch=${TARGETARCH} docker://${APP_IMAGE} containers-storage:[overlay@/usr/lib/containers/storage+/run/containers/storage]${APP_IMAGE}
RUN echo ${APP_IMAGE}; skopeo copy --override-arch=${TARGETARCH} docker://${SERVER_IMAGE} containers-storage:[overlay@/usr/lib/containers/storage+/run/containers/storage]${SERVER_IMAGE}
RUN skopeo copy --override-arch=${TARGETARCH} docker://${Model_IMAGE} containers-storage:[overlay@/usr/lib/containers/storage+/run/containers/storage]${MODEL_IMAGE}
RUN podman system reset --force 2>/dev/null
EXPOSE 8501

View File

@ -0,0 +1,24 @@
# Example: an AI powered sample application is embedded as a systemd service
# via Podman quadlet files in /usr/share/containers/systemd
#
# from recipes/natural_language_processing/audio-to-text, run
# 'make bootc'
FROM quay.io/centos-bootc/centos-bootc:stream9
ARG SSHPUBKEY
# The --build-arg "SSHPUBKEY=$(cat ~/.ssh/id_rsa.pub)" option inserts your
# public key into the image, allowing root access via ssh.
RUN set -eu; mkdir -p /usr/ssh && \
echo 'AuthorizedKeysFile /usr/ssh/%u.keys .ssh/authorized_keys .ssh/authorized_keys2' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \
echo ${SSHPUBKEY} > /usr/ssh/root.keys && chmod 0600 /usr/ssh/root.keys
ARG RECIPE=audio-to-text
# Add quadlet files to setup system to automatically run AI application on boot
COPY build/${RECIPE}.image build/${RECIPE}.kube build/${RECIPE}.yaml /usr/share/containers/systemd
# Added for running as an OCI Container to prevent Overlay on Overlay issues.
VOLUME /var/lib/containers
EXPOSE 8501

View File

@ -0,0 +1,94 @@
## Embed workload (AI sample applications) in a bootable container image
### Create a custom centos-bootc:stream9 image
* [Containerfile](./Containerfile) - embeds an LLM-powered sample chat application.
Details on the application can be found [in the audio-to-text/README.md](../README.md). By default, this Containerfile includes a model-server
that is meant to run with CPU - no additional GPU drivers or toolkits are embedded. You can substitute the llamacpp_python model-server image
for one that has GPU drivers and toolkits with additional build-args. The `FROM` must be replaced with a base image that has the necessary
kernel drivers and toolkits if building for GPU enabled systems. For an example of an NVIDIA/CUDA base image,
see [NVIDIA bootable image example](https://gitlab.com/bootc-org/examples/-/tree/main/nvidia?ref_type=heads)
In order to pre-pull the workload images, you need to build from the same architecture you're building for.
If not pre-pulling the workload images, you can cross build (ie, build from a Mac for an X86_64 system).
To build the derived bootc image for x86_64 architecture, run the following:
```bash
cd recipes/natural_language_processing/audio-to-text
# for CPU powered sample LLM application
# to switch to an alternate platform like aarch64, pass --platform linux/arm64
# the --cap-add SYS_ADMIN switch is needed when you are embedding Podman
# commands within the container build. If the registry you are pulling images
# from requires authentication, then you will need to volume mount the
# auth_json file with SELinux separation disabled.
podman login --auth-file auth.json quay.io/yourrepo
podman build --build-arg "sshpubkey=$(cat ~/.ssh/id_rsa.pub)" \
--security-opt label=disable \
-v ./auth.json:/run/containers/0/auth.json \
--cap-add SYS_ADMIN \
-t quay.io/yourrepo/youros:tag .
# for GPU powered sample LLM application with llamacpp cuda model server
podman build --build-arg "sshpubkey=$(cat ~/.ssh/id_rsa.pub)" \
--build-arg "model-server-image="quay.io/ai-lab/llamacpp_python_cuda:latest" \
--from <YOUR BOOTABLE IMAGE WITH NVIDIA/CUDA> \
--cap-add SYS_ADMIN \
--platform linux/amd64 \
-t quay.io/yourrepo/youros:tag .
podman push quay.io/yourrepo/youros:tag
```
### Update a bootc-enabled system with the new derived image
To build a disk image from an OCI bootable image, you can refer to [bootc-org/examples](https://gitlab.com/bootc-org/examples).
For this example, we will assume a bootc enabled system is already running.
If already running a bootc-enabled OS, `bootc switch` can be used to update the system to target a new bootable OCI image with embedded workloads.
SSH into the bootc-enabled system and run:
```bash
bootc switch quay.io/yourrepo/youros:tag
```
The necessary image layers will be downloaded from the OCI registry, and the system will prompt you to reboot into the new operating system.
From this point, with any subsequent modifications and pushes to the `quay.io/yourrepo/youreos:tag` OCI image, your OS can be updated with:
```bash
bootc upgrade
```
### Accessing the embedded workloads
The audio-to-text can be accessed by visiting port `8150` of the running bootc system.
They will be running as systemd services from Podman quadlet files placed at `/usr/share/containers/systemd/` on the bootc system.
For more information about running containerized applications as systemd services with Podman, refer to this
[Podman quadlet post](https://www.redhat.com/sysadmin/quadlet-podman) or, [podman documentation](https://podman.io/docs)
To monitor the sample applications, SSH into the bootc system and run either:
```bash
systemctl status audio-to-text
```
You can also view the pods and containers that are managed with systemd by running:
```
podman pod list
podman ps -a
```
To stop the sample applications, SSH into the bootc system and run:
```bash
systemctl stop audio-to-text
```
To run the sample application _not_ as a systemd service, stop the services then
run the appropriate commands based on the application you have embedded.
```bash
podman kube play /usr/share/containers/systemd/audio-to-text.yaml
```

View File

@ -1,4 +1,4 @@
### Run audio-text locally as a podman pod
### Run audio-to-text as a systemd service
There are pre-built images and a pod definition to run this audio-to-text example application.
This sample converts an audio waveform (.wav) file to text.
@ -6,7 +6,7 @@ This sample converts an audio waveform (.wav) file to text.
To run locally,
```bash
podman kube play ./quadlet/audio-to-text.yaml
podman kube play ./build/audio-to-text.yaml
```
To monitor locally,
@ -18,13 +18,12 @@ podman logs <name of container from the above>
The application should be accessible at `http://localhost:8501`. It will take a few minutes for the model to load.
### Run audio-text as a systemd service
### Run audio-to-text as a systemd service
```bash
cp audio-text.yaml /etc/containers/systemd/audio-text.yaml
cp audio-text.kube.example /etc/containers/audio-text.kube
cp audio-text.image /etc/containers/audio-text.image
(cd ../;make quadlet)
sudo cp ../build/audio-to-text.yaml ../build/audio-to-text.kube ../build/audio-to-text.image /usr/share/containers/systemd/
/usr/libexec/podman/quadlet --dryrun (optional)
systemctl daemon-reload
systemctl start audio-text
systemctl start audio-to-text
```

View File

@ -1,7 +0,0 @@
[Install]
WantedBy=audio-text.service
[Image]
Image=quay.io/redhat-et/locallm-whisper-ggml-small:latest
Image=quay.io/redhat-et/locallm-whisper-service:latest
Image=quay.io/redhat-et/locallm-audio-to-text:latest

View File

@ -0,0 +1,7 @@
[Install]
WantedBy=audio-to-text.service
[Image]
Image=APP_IMAGE
Image=MODEL_IMAGE
Image=SERVER_IMAGE

View File

@ -7,7 +7,7 @@ RequiresMountsFor=%t/containers
[Kube]
# Point to the yaml file in the same directory
Yaml=audio-text.yaml
Yaml=audio-to-text.yaml
[Service]
Restart=always

View File

@ -7,7 +7,7 @@ metadata:
spec:
initContainers:
- name: model-file
image: quay.io/redhat-et/locallm-whisper-ggml-small:latest
image: MODEL_IMAGE
command: ['/usr/bin/install', "/model/ggml-small.bin", "/shared/"]
volumeMounts:
- name: model-file
@ -16,7 +16,7 @@ spec:
- env:
- name: MODEL_ENDPOINT
value: http://0.0.0.0:8001
image: quay.io/redhat-et/locallm-audio-to-text:latest
image: APP_IMAGE
name: audio-to-text
ports:
- containerPort: 8501
@ -29,8 +29,8 @@ spec:
- name: PORT
value: 8001
- name: MODEL_PATH
value: /model/ggml-small.bin
image: quay.io/redhat-et/locallm-whisper-service:latest
value: /model/model.file
image: SERVER_IMAGE
name: whisper-model-service
ports:
- containerPort: 8001

View File

@ -4,16 +4,20 @@ REGISTRY_ORG ?= ai-lab
IMAGE_NAME ?= $(REGISTRY_ORG)/${APP}:latest
APP_IMAGE ?= $(REGISTRY)/$(IMAGE_NAME)
CHROMADB_IMAGE ?= $(REGISTRY)/$(REGISTRY_ORG)/chromadb:latest
MODEL_IMAGE ?= $(REGISTRY)/$(REGISTRY_ORG)/mistral-7b-instruct:latest
SERVER_IMAGE ?= $(REGISTRY)/$(REGISTRY_ORG)/llamacpp-python:latest
MODEL_IMAGE ?= $(REGISTRY)/$(REGISTRY_ORG)/granite-7b-lab:latest
SERVER_IMAGE ?= $(REGISTRY)/$(REGISTRY_ORG)/llamacpp_python:latest
SSH_PUBKEY ?= $(shell cat ${HOME}/.ssh/id_rsa.pub;)
BOOTC_IMAGE ?= quay.io/$(REGISTRY_ORG)/${APP}-bootc:latest
BOOTC_IMAGE_BUILDER ?= quay.io/centos-bootc/bootc-image-builder
DISK_TYPE ?= qcow2
DISK_UID ?= $(shell id -u)
DISK_GID ?= $(shell id -g)
FROM ?=
ARCH ?=
BUILD_ARG_FILE ?=
CONTAINERFILE ?= Containerfile
GRAPH_ROOT=$(shell podman info --format '{{ .Store.GraphRoot }}')
UMASK=$(shell umask)
ROOTLESS_AUTH_JSON=${XDG_RUNTIME_DIR}/containers/auth.json
ROOTFUL_AUTH_JSON=/run/containers/0/auth.json
@ -21,11 +25,11 @@ NONLINUX_AUTH_JSON=${HOME}/.config/containers/auth.json
AUTH_JSON ?=
ifneq ("$(wildcard $(NONLINUX_AUTH_JSON))","")
AUTH_JSON=$(NONINUX_AUTH_JSON);
AUTH_JSON=$(NONLINUX_AUTH_JSON)
else ifneq ("$(wildcard $(ROOTLESS_AUTH_JSON))","")
AUTH_JSON=$(ROOTLESS_AUTH_JSON);
AUTH_JSON=$(ROOTLESS_AUTH_JSON)
else ifneq ("$(wildcard $(ROOTFUL_AUTH_JSON))","")
AUTH_JSON=$(ROOTFUL_AUTH_JSON);
AUTH_JSON=$(ROOTFUL_AUTH_JSON)
endif
CHROMEDRIVER_VERSION := 103.0.5060.53
@ -36,6 +40,9 @@ CHROME_DOWNLOAD_PATH ?=
OS := $(shell uname -s)
ARCH := $(shell uname -m)
ifeq ($(ARCH),x86_64)
ARCH := amd64
endif
ifeq ($(OS),Darwin) # This structure may vary if we upgrade chromedriver, see index: https://chromedriver.storage.googleapis.com/index.html
ifeq ($(ARCH),amd64)
@ -46,7 +53,7 @@ ifeq ($(OS),Darwin) # This structure may vary if we upgrade chromedriver, see in
CHROME_DOWNLOAD_PATH := googlechrome.dmg
else ifeq ($(OS),Linux)
CHROMEDRIVER_DOWNLOAD_PATH := chromedriver_linux64.zip
CHROME_DOWNLOAD_PATH := google-chrome-stable_current_amd64.deb
CHROME_DOWNLOAD_PATH := google-chrome-stable_current_$(ARCH).deb
endif
CHROME_MIRROR := https://www.slimjet.com/chrome/files/$(CHROMEDRIVER_VERSION)/$(CHROME_DOWNLOAD_PATH)
@ -57,15 +64,10 @@ UNZIP_EXISTS ?= $(shell command -v unzip)
RELATIVE_MODELS_PATH := ?=
RELATIVE_TESTS_PATH := ?=
MISTRAL_MODEL_NAME := mistral-7b-instruct-v0.1.Q4_K_M.gguf
MISTRAL_MODEL_URL := https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
GRANITE_MODEL_NAME := granite-7b-lab-Q4_K_M.gguf
GRANITE_MODEL_URL := https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf
MODEL_NAME ?= $(MISTRAL_MODEL_NAME)
.PHONY: download-model-mistral
download-model-mistral:
cd ../../../models && \
make MODEL_NAME=mistral-7b-instruct-v0.1.Q4_K_M.gguf MODEL_URL=https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf -f Makefile download-model
MODEL_NAME ?= $(GRANITE_MODEL_NAME)
.PHONY: install
install::
@ -75,21 +77,24 @@ install::
.PHONY: build
build:
podman build --squash-all $${ARCH:+--platform linux/$${ARCH}} $${FROM:+--from $${FROM}} -t ${APP_IMAGE} app/
podman build --squash-all \
$(ARCH:%=--platform linux/%) \
$(BUILD_ARG_FILE:%=--build-arg-file=%) \
$(FROM:%=--from %) -t ${APP_IMAGE} app/
.PHONY: bootc
bootc: quadlet
bootc: quadlet growfs
podman build \
$${ARCH:+--arch $${ARCH}} \
$${FROM:+--from $${FROM}} \
$${AUTH_JSON:+-v $${AUTH_JSON}:/run/containers/0/auth.json} \
$(ARCH:%=--arch %) \
$(BUILD_ARG_FILE:%=--build-arg-file=%) \
$(FROM:%=--from %) \
$(AUTH_JSON:%=-v %:/run/containers/0/auth.json) \
--security-opt label=disable \
--cap-add SYS_ADMIN \
--build-arg MODEL_IMAGE=$(MODEL_IMAGE) \
--build-arg APP_IMAGE=$(APP_IMAGE) \
--build-arg SERVER_IMAGE=$(SERVER_IMAGE) \
--build-arg "SSHPUBKEY=$(SSH_PUBKEY)" \
-v /etc/containers/policy.json:/etc/containers/policy.json \
-f bootc/$(CONTAINERFILE) \
-t ${BOOTC_IMAGE} bootc
@echo ""
@ -102,26 +107,31 @@ bootc: quadlet
.PHONY: bootc-run
bootc-run:
podman run -d --rm --name $(APP)-bootc -p 8080:8501 --privileged \
$${AUTH_JSON:+-v $${AUTH_JSON}:/run/containers/0/auth.json} \
$(AUTH_JSON:%=-v %:/run/containers/0/auth.json) \
$(BOOTC_IMAGE) /sbin/init
.PHONY: bootc-image-builder
bootc-image-builder: bootc
bootc-image-builder:
@if podman image exists $(BOOTC_IMAGE); then \
echo "$(BOOTC_IMAGE) exists in local storage, using it"; \
else \
$(MAKE) bootc; \
fi
mkdir -p build/store
podman run \
--rm \
-ti \
-v $(GRAPH_ROOT):/var/lib/containers/storage \
$${ARCH:+--arch $${ARCH}} \
$${AUTH_JSON:+-v $${AUTH_JSON}:/run/containers/0/auth.json} \
$(ARCH:%=--arch %) \
$(AUTH_JSON:%=-v %:/run/containers/0/auth.json) \
--privileged \
--pull newer \
-v /etc/containers/policy.json:/etc/containers/policy.json \
-v ./build:/output \
-v ./build/store:/store \
$(BOOTC_IMAGE_BUILDER) \
$${ARCH:+--target-arch $${ARCH}} \
$(ARCH:%=--target-arch %) \
--type $(DISK_TYPE) \
--chown $(DISK_UID):$(DISK_GID) \
--local \
$(BOOTC_IMAGE)
@ -129,7 +139,7 @@ bootc-image-builder: bootc
install-chromedriver:
@if [[ -z "$(LOCAL_CHROMEDRIVER_EXISTS)" ]]; then \
if [[ -n "$(UNZIP_EXISTS)" ]]; then \
curl --max-time 300 --connect-timeout 60 -sLO $(CHROMEDRIVER_MIRROR)/$(CHROMEDRIVER_VERSION)/$(CHROMEDRIVER_DOWNLOAD_PATH); \
curl --progress-bar --max-time 3000 --connect-timeout 60 -LO $(CHROMEDRIVER_MIRROR)/$(CHROMEDRIVER_VERSION)/$(CHROMEDRIVER_DOWNLOAD_PATH); \
unzip $(CHROMEDRIVER_DOWNLOAD_PATH); \
mv chromedriver $(RECIPE_BINARIES_PATH)/; \
rm ./$(CHROMEDRIVER_DOWNLOAD_PATH); \
@ -141,17 +151,28 @@ install-chromedriver:
.PHONY: install-chrome
install-chrome:
curl --max-time 300 --connect-timeout 60 -sLO $(CHROME_MIRROR)
curl --progress-bar --max-time 3000 --connect-timeout 60 -LO $(CHROME_MIRROR)
@if [[ "$(OS)" == "Linux" ]]; then \
sudo dpkg -i $(CHROME_DOWNLOAD_PATH); \
elif [[ "$(OS)" == "Darwin" ]]; then \
open $(CHROME_DOWNLOAD_PATH); \
ls "/Volumes/Google Chrome/Google Chrome.app/Contents/MacOS/Google Chrome"; \
cp -r "/Volumes/Google Chrome/Google Chrome.app" "$(RECIPE_BINARIES_PATH)/"; \
cp -pr "/Volumes/Google Chrome/Google Chrome.app" "$(RECIPE_BINARIES_PATH)/"; \
diskutil unmount "/Volumes/Google Chrome" || true; \
rm $(CHROME_DOWNLOAD_PATH); \
fi;
.PHONY: check-umask
check-umask:
@test "$(UMASK)" = "0022" || \
(echo; echo -n "Error: umask $(UMASK) will cause unexpected behaviour: use umask 022! "; \
echo "Verify the `ai-lab-recipes` git repository was cloned with umask 0022"; exit 1)
.PHONY: growfs
growfs: quadlet check-umask
# Add growfs service
mkdir -p build; cp -pR ../../common/usr build/
.PHONY: quadlet
quadlet:
# Modify quadlet files to match the server, model and app image
@ -167,7 +188,7 @@ quadlet:
-e "s|MODEL_IMAGE|${MODEL_IMAGE}|g" \
quadlet/${APP}.yaml \
> build/${APP}.yaml
cp quadlet/${APP}.kube build/${APP}.kube
cp -p quadlet/${APP}.kube build/${APP}.kube
.PHONY: run
run:

View File

@ -28,8 +28,10 @@ used to override defaults for a variety of make targets.
|BOOTC_IMAGE_BUILDER | Bootc Image Builder container image | `quay.io/centos-bootc/bootc-image-builder` |
|CHROMADB_IMAGE | ChromaDB image to be used for application | `$(REGISTRY)/$(REGISTRY_ORG)/chromadb:latest` |
|DISK_TYPE | Disk type to be created by BOOTC_IMAGE_BUILDER | `qcow2` (Options: ami, iso, vmdk, raw) |
|MODEL_IMAGE | AI Model to be used by application | `$(REGISTRY)/$(REGISTRY_ORG)/mistral-7b-instruct:latest`|
|SERVER_IMAGE | AI Model Server Application | `$(REGISTRY)/$(REGISTRY_ORG)/llamacpp-python:latest` |
|DISK_UID | Disk UID to be specified by BOOTC_IMAGE_BUILDER | `$(shell id -u)` |
|DISK_GID | Disk GID to be specified by BOOTC_IMAGE_BUILDER | `$(shell id -g)` |
|MODEL_IMAGE | AI Model to be used by application | `$(REGISTRY)/$(REGISTRY_ORG)/granite-7b-lab:latest`|
|SERVER_IMAGE | AI Model Server Application | `$(REGISTRY)/$(REGISTRY_ORG)/llamacpp_python:latest` |
|SSH_PUBKEY | SSH Public key preloaded in bootc image. | `$(shell cat ${HOME}/.ssh/id_rsa.pub;)` |
|FROM | Overrides first FROM instruction within Containerfile| `FROM` line defined in the Containerfile |
|ARCH | Use alternate arch for image build | Current Arch |
@ -37,4 +39,4 @@ used to override defaults for a variety of make targets.
Examples
make bootc FROM=registry.redhat.io/rhel9-beta/rhel-bootc:9.4 APP_IMAGE=quay.io/myorg/chatbot-bootc
make bootc FROM=registry.redhat.io/rhel9/rhel-bootc:9.4 APP_IMAGE=quay.io/myorg/chatbot-bootc

View File

@ -0,0 +1,20 @@
[Unit]
Description=Bootc Fallback Root Filesystem Grow
Documentation=https://gitlab.com/fedora/bootc/docs
# For now we skip bare metal cases, and we also have nothing to do
# for containers.
ConditionVirtualization=vm
# This helps verify that we're running in a bootc/ostree based target.
ConditionPathIsMountPoint=/sysroot
# We want to run before any e.g. large container images might be pulled.
DefaultDependencies=no
Requires=sysinit.target
After=sysinit.target
Before=basic.target
[Service]
ExecStart=/usr/libexec/bootc-generic-growpart
# So we can temporarily remount the sysroot writable
MountFlags=slave
# Just to auto-cleanup our temporary files
PrivateTmp=yes

View File

@ -0,0 +1 @@
../bootc-generic-growpart.service

View File

@ -0,0 +1,41 @@
#!/bin/bash
set -eu
backing_device=$(findmnt -vno SOURCE /sysroot)
echo "Backing device: ${backing_device}"
syspath=/sys/class/block/$(basename "${backing_device}")
if ! test -d "${syspath}"; then
echo "failed to find backing device ${syspath}"; exit 1
fi
# Handling devicemapper targets is a whole other thing
case $backing_device in
/dev/mapper/*) "Not growing $backing_device"; exit 0 ;;
esac
# Note that we expect that the rootfs is on a partition
partition=$(cat "${syspath}"/partition)
# Walk up to find the parent blockdev
parentpath=$(dirname "$(realpath "${syspath}")")
devmajmin=$(cat "${parentpath}"/dev)
parent="/dev/block/${devmajmin}"
# Grow the partition
tmpf=$(mktemp)
# Ignore errors because growpart exits 1 if nothing changed;
# we need to check the output for NOCHANGE:
if ! /usr/bin/growpart "${parent}" "${partition}" > "${tmpf}"; then
cat "${tmpf}"
if grep -qEe '^NOCHANGE: ' "${tmpf}"; then
exit 0
fi
echo "growpart failed"
exit 1
fi
cat "${tmpf}"
# Now, temporarily remount the sysroot writable in our mount namespace
mount -o remount,rw /sysroot
# And defer to systemd's growfs wrapper which handles dispatching on
# the target filesystem type.
/usr/lib/systemd/systemd-growfs /sysroot

View File

@ -0,0 +1,15 @@
SHELL := /bin/bash
APP ?= object_detection_client
PORT ?= 8501
MODEL_NAME ?= facebook/detr-resnet-101
include ../../common/Makefile.common
.PHONY: functional-tests
functional-tests:
IMAGE_NAME=${IMAGE_NAME} REGISTRY=${REGISTRY} MODEL_NAME=${MODEL_NAME} pytest -vvv --driver=Chrome --driver-path=$(RECIPE_BINARIES_PATH)/chromedriver ${RELATIVE_TESTS_PATH}/functional
RECIPE_BINARIES_PATH := $(shell realpath ../../common/bin)
RELATIVE_MODELS_PATH := ../../../models
RELATIVE_TESTS_PATH := ../tests

View File

@ -56,11 +56,11 @@ The local Model Service relies on a volume mount to the localhost to access the
make run
```
As stated above, by default the model service will use [`facebook/detr-resnet-101`](https://huggingface.co/facebook/detr-resnet-101). However you can use other compatabale models. Simply pass the new `MODEL_NAME` and `MODEL_PATH` to the make command. Make sure the model is downloaded and exists in the [models directory](../../../models/):
As stated above, by default the model service will use [`facebook/detr-resnet-101`](https://huggingface.co/facebook/detr-resnet-101). However you can use other compatible models. Simply pass the new `MODEL_NAME` and `MODEL_PATH` to the make command. Make sure the model is downloaded and exists in the [models directory](../../../models/):
```bash
# from path model_servers/object_detection_python from repo containers/ai-lab-recipes
make MODEL_NAME=facebook/detr-resnet-50 MODEL_PATH=/models/facebook/detr-resnet-50 run
make MODEL_NAME=facebook/detr-resnet-50 MODEL_PATH=/models/facebook/detr-resnet-101 run
```
## Build the AI Application
@ -81,7 +81,7 @@ This could be any appropriately hosted Model Service (running locally or in the
The following Podman command can be used to run your AI Application:
```bash
podman run -p 8501:8501 -e MODEL_ENDPOINT=http://10.88.0.1:8000/detection object_detection_client
podman run -p 8501:8501 -e MODEL_ENDPOINT=http://10.88.0.1:8000 object_detection_client
```
### Interact with the AI Application

View File

@ -2,14 +2,14 @@ version: v1.0
application:
type: vision
name: Object Detection
description: This is an example object detection demo
description: Detect and classify objects in images.
containers:
- name: object-detection-server
contextdir: ../../../model_servers/object_detection_python
containerfile: ./base/Containerfile
model-service: true
backend:
- torch
backend:
- pytorch
arch:
- arm64
- amd64
@ -17,7 +17,7 @@ application:
- 8000
image: quay.io/redhat-et/locallm-object-detection-server:latest
- name: object-detection-client
contextdir: ./client
contextdir: ./app
containerfile: Containerfile
arch:
- arm64

View File

@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
FROM registry.access.redhat.com/ubi9/python-311:1-77.1726664316
WORKDIR /locallm
COPY requirements.txt /locallm/requirements.txt
RUN pip install --upgrade pip && \

View File

@ -7,8 +7,11 @@ import io
st.title("🕵️‍♀️ Object Detection")
endpoint =os.getenv("MODEL_ENDPOINT", default = "http://0.0.0.0:8000")
endpoint_bearer = os.getenv("MODEL_ENDPOINT_BEARER")
headers = {"accept": "application/json",
"Content-Type": "application/json"}
if endpoint_bearer:
headers["Authorization"] = f"Bearer {endpoint_bearer}"
image = st.file_uploader("Upload Image")
window = st.empty()
@ -23,6 +26,8 @@ if image:
window.image(img, use_column_width=True)
# convert PIL image into bytes for post request
bytes_io = io.BytesIO()
if img.mode in ("RGBA", "P"):
img = img.convert("RGB")
img.save(bytes_io, "JPEG")
img_bytes = bytes_io.getvalue()
b64_image = base64.b64encode(img_bytes).decode('utf-8')

View File

@ -0,0 +1,40 @@
altair==5.3.0
attrs==23.2.0
blinker==1.7.0
cachetools==5.3.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.8
gitdb==4.0.12
GitPython==3.1.44
idna==3.7
Jinja2==3.1.6
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
numpy==1.26.4
packaging==24.0
pandas==2.2.3
pillow==10.3.0
protobuf==4.25.3
pyarrow==15.0.2
pydeck==0.8.1b0
Pygments==2.17.2
python-dateutil==2.9.0.post0
pytz==2024.1
referencing==0.34.0
requests==2.31.0
rich==13.7.1
rpds-py==0.18.1
six==1.16.0
smmap==5.0.2
streamlit==1.33.0
tenacity==8.2.3
toml==0.10.2
toolz==0.12.1
tornado==6.4.2
typing_extensions==4.11.0
tzdata==2024.1
urllib3==2.2.3

View File

@ -1,3 +0,0 @@
streamlit
requests
pillow

View File

@ -0,0 +1,8 @@
import pytest
import os
@pytest.fixture
def chrome_options(chrome_options):
chrome_options.add_argument("--headless")
return chrome_options

Some files were not shown because too many files have changed in this diff Show More