Skip to content

Multistage build with baked-in models needed for the enabled guardrails#12

Merged
m-misiura merged 1 commit into
trustyai-explainability:developfrom
m-misiura:dockerfile-optimizations
Nov 25, 2025
Merged

Multistage build with baked-in models needed for the enabled guardrails#12
m-misiura merged 1 commit into
trustyai-explainability:developfrom
m-misiura:dockerfile-optimizations

Conversation

@m-misiura
Copy link
Copy Markdown
Collaborator

Description

Dockerfile server (Dockerfile.server)

  • can be built with two optional profiles ARG GUARDRAILS_PROFILE; when ARG GUARDRAILS_PROFILE is set to "opensource", closed source guardrails as specified in scripts/provider-list.yaml are removed; when ARG GUARDRAILS_PROFILE is set to "all", there is no removal
  • there are two additional scripts (scripts/discover_required_models.py and pre_download_required_models.py) which attempt to find which models are being used by the guardrails; then these models are downloaded inside the image

pyproject.toml

  • added a section for the optional model deps
  • added cpu pytorch as an explicit dependency

Test

Ran this small demo: https://github.com/m-misiura/demos/tree/main/nemo_openshift with the following image: quay.io/rh-ee-mmisiura/nemo-guardrails:os_profile_with_models

@m-misiura m-misiura requested review from a team, RobGeada, christinaexyou, dmaniloff and tarilabs and removed request for a team, dmaniloff and tarilabs November 11, 2025 16:59
@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@m-misiura m-misiura merged commit a200fc5 into trustyai-explainability:develop Nov 25, 2025
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants