Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
3852873
feat: update docs and demos
saichandrapandraju Feb 18, 2026
fc7d1a2
Merge pull request #90 from saichandrapandraju/docs-update
saichandrapandraju Feb 19, 2026
33724f4
feat: Add EvalHub SDK Garak adapter (#91)
ruivieira Feb 26, 2026
43f9e45
feat(evalhub): Add preliminary KFP execution mode for evalhub garak i…
saichandrapandraju Mar 2, 2026
279d94f
address sourcery comments
saichandrapandraju Mar 2, 2026
002c13e
Update default Garak provider image to the latest version
saichandrapandraju Mar 2, 2026
998e34f
Merge pull request #96 from trustyai-explainability/evalhub-kfp-poc
saichandrapandraju Mar 2, 2026
52521fc
feat(evalhub): Add dedicated KFP entrypoint for EvalHub adapter
saichandrapandraju Mar 5, 2026
4622fad
feat: added pre-process step that takes a dataset in input and genera…
ABeltramo Feb 3, 2026
a2bca0a
feat: added basic Automated Red Teaming report
ABeltramo Feb 5, 2026
967b1b5
fix: failing test in Github Actions
ABeltramo Feb 5, 2026
63db430
feat: bring latest vega chart from AIMI
ABeltramo Feb 5, 2026
1c334a5
feat: added second chart in report
ABeltramo Feb 5, 2026
6cacec6
feat: using PatternFly for UI styling, added high level stats
ABeltramo Feb 6, 2026
f372545
feat: added probes from run setup
ABeltramo Feb 9, 2026
3c811ec
feat: add happy path KFP integration with latest garak provider changes
saichandrapandraju Feb 18, 2026
fa3a0b9
fix: parsing latest output from Garak and charts in the report
ABeltramo Feb 19, 2026
e0226c8
fix: report navigation and header
ABeltramo Feb 19, 2026
035ce54
fix: vega chart and better test example
ABeltramo Feb 19, 2026
773c276
fix: parse_generations_from_report_content for ART report + test
ABeltramo Feb 20, 2026
9bda683
fix: failing test after pointing Garak to our midstream
ABeltramo Feb 20, 2026
7db76bb
Source intent description from dataset column with configurable argument
hjrnunes Feb 25, 2026
14cc746
Sanitize category/intent ids to match Garak's validation
hjrnunes Feb 25, 2026
1f7d51c
fix: include resources directory in package distribution
hjrnunes Feb 25, 2026
dacfa00
feat: Add user-provided intents dataset flow + fix metric calc with i…
saichandrapandraju Feb 27, 2026
35b09c4
fix: match KFP asr metric log with html report for intents probes
saichandrapandraju Feb 27, 2026
2595156
fix: update intent_spec field to default to an empty string for nativ…
saichandrapandraju Feb 27, 2026
8fec24c
feat: Integrate Synthetic Data Generation (SDG) support for intent da…
saichandrapandraju Feb 28, 2026
2193e88
- Fix parse_detector to match EarlyStopHarness logic, preserving funn…
hjrnunes Feb 27, 2026
97136b5
Updated test_intents_aggregates_match_high_level_stats to match renam…
hjrnunes Mar 4, 2026
5dc10c1
Enhance parse_results to upload and fetch intents HTML reports
saichandrapandraju Mar 5, 2026
6385789
Garak supports intent stub files in json format. This is preferable a…
hjrnunes Mar 5, 2026
c980e3e
Fix tests for json intent stub files support.
hjrnunes Mar 5, 2026
e0b3743
Consolidate terminology and refactor result_utils.py
hjrnunes Mar 5, 2026
5a9300d
Add take_per_category and sample_per_category parameters to generate_…
hjrnunes Mar 5, 2026
f3c68f4
Fix funnel chart cascading and probe details ASR calculation
hjrnunes Mar 5, 2026
ac062bf
Handle orphan status=1 attempts and remove simulated funnel cascading
hjrnunes Mar 5, 2026
9be44a7
Merge pull request #77 from trustyai-explainability/automated-red-tea…
saichandrapandraju Mar 6, 2026
0c5d0e8
Merge branch 'main' into evalhub-kfp-entrypoint
saichandrapandraju Mar 6, 2026
4e59f54
Remove default CMD for eval-hub in Containerfile as we will specify t…
saichandrapandraju Mar 6, 2026
63baa50
feat(evalhub): Add intents benchmark support to evalhub KFP executio…
saichandrapandraju Mar 6, 2026
8843fd2
Add tests for benchmark config overrides and API key resolution logic
saichandrapandraju Mar 6, 2026
f0b7f7f
fix imports
saichandrapandraju Mar 6, 2026
32d287c
Merge pull request #98 from trustyai-explainability/evalhub-kfp-entry…
saichandrapandraju Mar 6, 2026
46bc6c3
Merge pull request #104 from trustyai-explainability/evalhub-kfp-intents
saichandrapandraju Mar 6, 2026
09f95de
fix(sdg): pass correct lls url by default to sdg
saichandrapandraju Mar 9, 2026
aebe2e5
feat(evalhub): Update S3 integration by adding support for reading cr…
ruivieira Mar 9, 2026
0f97d15
Merge pull request #112 from trustyai-explainability/fix-sdg-url
saichandrapandraju Mar 9, 2026
8d186c8
Merge pull request #116 from ruivieira/garak-test
saichandrapandraju Mar 10, 2026
cf4c306
fix(SDG): Introduce load_taxonomy_dataset function for policy taxonom…
saichandrapandraju Mar 10, 2026
1d654ae
address sourcery comments
saichandrapandraju Mar 10, 2026
6fe5736
fix S3 failing tests
saichandrapandraju Mar 10, 2026
e6e1763
refactor evalhub pipeline to support all 3 modes
saichandrapandraju Mar 11, 2026
3e766e7
change the calculation of intent aggregates to use "total_attempts" i…
saichandrapandraju Mar 11, 2026
dd0a7f5
fail fast if user requests intents for non-kfp evalhub mode
saichandrapandraju Mar 11, 2026
104d1e7
replicate the evalhub KFP functionality to llama-stack
saichandrapandraju Mar 11, 2026
1c4eb9e
Merge pull request #119 from trustyai-explainability/custom-policy-sdg
saichandrapandraju Mar 11, 2026
30822f8
refactor(evalhub): Remove EVALHUB_ prefix from KFP environment variables
SudipSinha Mar 10, 2026
e1252af
test: Strengthen error message assertions for KFP config validation
SudipSinha Mar 10, 2026
388077d
test: Fix validation tests by mocking garak import
SudipSinha Mar 11, 2026
49c10cc
fix: Secure model API key handling via Kubernetes Secrets with volume…
saichandrapandraju Mar 11, 2026
8aa0f63
chore: Update eval-hub-sdk to latest version 0.1.2
saichandrapandraju Mar 11, 2026
bf130ea
feat(evalhub): Add MLflow artifact saving functionality
saichandrapandraju Mar 11, 2026
b11737b
add warning if _read_s3_credentials_from_secret returns empty
saichandrapandraju Mar 12, 2026
6ffa665
Merge pull request #122 from trustyai-explainability/mlflow-callback
saichandrapandraju Mar 12, 2026
44188ac
Add comprehensive tests for intents benchmarks with shields enabled
SudipSinha Mar 12, 2026
8bb2276
Merge pull request #121 from trustyai-explainability/fix-api-keys
saichandrapandraju Mar 12, 2026
20245a8
Refactor tests to reduce duplication per code review feedback
SudipSinha Mar 12, 2026
897238c
Merge pull request #123 from trustyai-explainability/test-intents-shi…
saichandrapandraju Mar 12, 2026
7a6f77b
Merge pull request #120 from trustyai-explainability/remove-evalhub-k…
saichandrapandraju Mar 12, 2026
c1fab0a
Update default detector for Garak intents
hjrnunes Mar 12, 2026
0d3f590
Update TAPIntent probe defaults
hjrnunes Mar 12, 2026
ea90052
Update intents benchmark name and description
hjrnunes Mar 12, 2026
18b8727
Update intents benchmark description
hjrnunes Mar 12, 2026
31f081c
Merge pull request #124 from trustyai-explainability/art-defaults
saichandrapandraju Mar 12, 2026
9e4d403
introduce _GarakCallbacks to surface S3 artifact URLs in job response
saichandrapandraju Mar 12, 2026
f745ca0
bump version to 0.3.0
saichandrapandraju Mar 12, 2026
410399c
limit lls to 0.6.0
saichandrapandraju Mar 12, 2026
e9ee137
Merge pull request #126 from trustyai-explainability/bump-0.3.0
saichandrapandraju Mar 12, 2026
6eba57f
add requirements-inline-extra.txt and update pyproject.toml to fix py…
saichandrapandraju Mar 12, 2026
a276bb4
fix tests
saichandrapandraju Mar 12, 2026
10fa8bc
Merge pull request #127 from trustyai-explainability/pypi-publish-fix
saichandrapandraju Mar 12, 2026
1a3bf14
log artifact reporting failures and fallback to default reporting method
saichandrapandraju Mar 12, 2026
fbd360a
Merge pull request #125 from trustyai-explainability/artifacts-evalhub
saichandrapandraju Mar 12, 2026
d5f489d
Merge pull request #67 from trustyai-explainability/main
saichandrapandraju Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 288 additions & 0 deletions BENCHMARK_METADATA_REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
# Benchmark Metadata Reference

This document is the reference for fields supported in:

```python
client.alpha.benchmarks.register(..., metadata={...})
```

It covers:

- `garak_config` (detailed command config)
- shield fields (`shield_ids`, `shield_config`)
- runtime controls (`timeout`, remote-only retry/GPU keys)
- deep-merge behavior when updating predefined/existing benchmarks

## 1) Metadata Shape

```python
metadata = {
"garak_config": {
"system": {...},
"run": {...},
"plugins": {...},
"reporting": {...},
},
"timeout": 1800,
"shield_ids": ["Prompt-Guard-86M"], # or use shield_config
"max_retries": 3, # remote mode only
"use_gpu": False, # remote mode only
}
```

If `garak_config` is omitted, provider falls back to default Garak config (effectively broad/default probe selection), which can be very slow.

### 1.1 Build `garak_config` via Python models (optional)

You can construct config using typed models exported by this package:

```python
from llama_stack_provider_trustyai_garak import (
GarakCommandConfig,
GarakSystemConfig,
GarakRunConfig,
GarakPluginsConfig,
GarakReportingConfig,
)
```

Example:

```python
garak_cfg = GarakCommandConfig(
system=GarakSystemConfig(parallel_attempts=20),
run=GarakRunConfig(generations=2, eval_threshold=0.5),
plugins=GarakPluginsConfig(probe_spec=["promptinject.HijackHateHumans"]),
reporting=GarakReportingConfig(taxonomy="owasp"),
)

metadata = {
"garak_config": garak_cfg.to_dict(),
"timeout": 900,
}
```

## 2) Top-Level Metadata Keys

| Key | Type | Default | Mode | Notes |
|---|---|---|---|---|
| `garak_config` | `dict` | default `GarakCommandConfig()` | inline + remote | Main Garak command schema. Recommended to always set. |
| `timeout` | `int` (seconds) | provider default (`10800`) | inline + remote | Max scan runtime for a benchmark run. |
| `shield_ids` | `list[str]` | `[]` | inline + remote | Shortcut for input shields only. |
| `shield_config` | `dict` | `{}` | inline + remote | Explicit mapping: `{"input": [...], "output": [...]}`. |
| `max_retries` | `int` | `3` | remote only | KFP pipeline retry count for scan step. |
| `use_gpu` | `bool` | `False` | remote only | Requests GPU scheduling in KFP pipeline. |

Notes:

- If both `shield_ids` and `shield_config` are provided, `shield_ids` takes precedence.
- Unknown top-level keys are passed as provider params but are ignored unless consumed by adapter logic.

## 3) Shield Metadata Rules

### `shield_ids`

```python
"shield_ids": ["Prompt-Guard-86M"]
```

- Must be a list.
- Treated as input shields.
- Easier syntax for common cases.

### `shield_config`

```python
"shield_config": {
"input": ["Prompt-Guard-86M"],
"output": ["Llama-Guard-3-8B"]
}
```

- Must be a dictionary.
- Use when you need separate input/output shield chains.

Validation behavior:

- Provider validates shield IDs against Shields API.
- If Shields API is not enabled and shield metadata is present, run fails.

## 4) `garak_config` Detailed Schema

`garak_config` has four primary sections:

- `system`
- `run`
- `plugins`
- `reporting`

### 4.1 `garak_config.system`

| Field | Type | Default | Description |
|---|---|---|---|
| `parallel_attempts` | `bool \| int` | `16` | Parallel prompt attempts where supported. |
| `max_workers` | `int` | `500` | Upper bound for requested worker count. |
| `parallel_requests` | `bool \| int` | `False` | Parallel requests for generators lacking multi-response support. |
| `verbose` | `int` (`0..2`) | `0` | CLI verbosity. |
| `show_z` | `bool` | `False` | Show Z-scores in CLI output. |
| `narrow_output` | `bool` | `False` | Improve output for narrow terminals. |
| `lite` | `bool` | `True` | Lite mode caution output behavior. |
| `enable_experimental` | `bool` | `False` | Enable experimental Garak flags. |

### 4.2 `garak_config.run`

| Field | Type | Default | Description |
|---|---|---|---|
| `generations` | `int` | `1` | Number of generations per prompt. |
| `probe_tags` | `str \| None` | `None` | Tag-based probe selection (e.g. `owasp:llm`). |
| `eval_threshold` | `float` (`0..1`) | `0.5` | Detector threshold for hit/vulnerable decision. |
| `soft_probe_prompt_cap` | `int` | `256` | Preferred prompt cap for autoscaling probes. Lower values reduce prompts per probe and make runs faster (with reduced coverage/comprehensiveness). |
| `target_lang` | `str \| None` | `None` | BCP47 language target. |
| `langproviders` | `list[str] \| None` | `None` | Providers for language conversion. |
| `system_prompt` | `str \| None` | `None` | Default system prompt where applicable. |
| `seed` | `int \| None` | `None` | Reproducibility seed. |
| `deprefix` | `bool` | `True` | Remove prompt prefix echoed by model outputs. |

Performance tuning tip:

- Predefined benchmarks are comprehensive by default.
- To speed up exploratory runs, override `garak_config.run.soft_probe_prompt_cap` with a smaller value.
- For full security assessment/comparability, keep defaults (or use consistent cap across compared runs).

### 4.3 `garak_config.plugins`

| Field | Type | Default | Description |
|---|---|---|---|
| `probe_spec` | `list[str] \| str` | `"all"` | Probe/module/class selection. |
| `detector_spec` | `list[str] \| str \| None` | `None` | Detector override (`None` uses probe defaults). |
| `extended_detectors` | `bool` | `True` | Include extended detector set. |
| `buff_spec` | `list[str] \| str \| None` | `None` | Buff/module selection. |
| `buffs_include_original_prompt` | `bool` | `True` | Keep original prompt when buffing. |
| `buff_max` | `int \| None` | `None` | Cap output count from buffs. |
| `target_type` | `str` | auto-managed | Provider sets this for openai/function mode. |
| `target_name` | `str \| None` | auto-managed | Provider sets this to model or shield orchestrator. |
| `probes` | `dict \| None` | `None` | Probe plugin config tree. |
| `detectors` | `dict \| None` | `None` | Detector plugin config tree. |
| `generators` | `dict \| None` | `None` | Generator plugin config tree. |
| `buffs` | `dict \| None` | `None` | Buff plugin config tree. |
| `harnesses` | `dict \| None` | `None` | Harness plugin config tree. |

Provider behavior worth knowing:

- `probe_spec`, `detector_spec`, `buff_spec` accept string or list, and are normalized before run.
- If shield metadata is present, provider switches generator mode to function-based shield orchestration automatically.
- Otherwise provider uses OpenAI-compatible generator mode.

### 4.4 `garak_config.reporting`

| Field | Type | Default | Description |
|---|---|---|---|
| `taxonomy` | `str \| None` | `None` | Grouping taxonomy (`owasp`, `avid-effect`, `quality`, `cwe`). |
| `show_100_pass_modules` | `bool` | `True` | Include fully passing entries in HTML report details. |
| `show_top_group_score` | `bool` | `True` | Show top-level aggregate in grouped report sections. |
| `group_aggregation_function` | `str` | `"lower_quartile"` | Group aggregation strategy in report. |
| `report_dir` | `str \| None` | auto-managed | Provider-managed output location; usually leave unset. |
| `report_prefix` | `str \| None` | auto-managed | Provider-managed output prefix; usually leave unset. |

Please refer to [Garak configuration docs](https://reference.garak.ai/en/latest/configurable.html#config-files-yaml-and-json) for details about these controls.

## 5) Deep-Merge Behavior (Updating Predefined/Existing Benchmarks)

When registering with `provider_benchmark_id`, metadata is deep-merged:

- base metadata comes from:
- predefined profile (`trustyai_garak::...`), or
- existing benchmark metadata
- your new metadata overrides only specified keys

Example:

```python
client.alpha.benchmarks.register(
benchmark_id="quick_promptinject_tuned",
dataset_id="garak",
scoring_functions=["garak_scoring"],
provider_id=garak_provider_id,
provider_benchmark_id="trustyai_garak::quick",
metadata={
"garak_config": {
"plugins": {"probe_spec": ["promptinject"]},
"system": {"parallel_attempts": 20},
},
"timeout": 1200,
},
)
```

## 6) Practical Examples

### Example A: Minimal custom benchmark

```python
metadata = {
"garak_config": {
"plugins": {"probe_spec": ["promptinject.HijackHateHumans"]},
"run": {"generations": 2, "eval_threshold": 0.5},
"reporting": {"taxonomy": "owasp"},
},
"timeout": 900,
}
```

### Example B: Explicit input/output shield mapping

```python
metadata = {
"garak_config": {
"plugins": {"probe_spec": ["promptinject.HijackHateHumans"]},
},
"shield_config": {
"input": ["Prompt-Guard-86M"],
"output": ["Llama-Guard-3-8B"],
},
"timeout": 600,
}
```

### Example C: Remote retry/GPU controls

```python
metadata = {
"garak_config": {
"run": {"probe_tags": "owasp:llm"},
},
"timeout": 7200,
"max_retries": 2,
"use_gpu": True,
}
```

### Example D: Faster predefined benchmark variant

```python
metadata = {
"garak_config": {
"run": {
"soft_probe_prompt_cap": 100
}
},
"timeout": 7200,
}

# Register as a tuned variant of a predefined benchmark
client.alpha.benchmarks.register(
benchmark_id="owasp_fast",
dataset_id="garak",
scoring_functions=["garak_scoring"],
provider_id=garak_provider_id,
provider_benchmark_id="trustyai_garak::owasp_llm_top10",
metadata=metadata,
)
```

## 7) Legacy / Compatibility Notes

- Prefer `metadata.garak_config.plugins.probe_spec` over old top-level `metadata.probes`.
- Prefer `metadata.garak_config.run.eval_threshold` for threshold control.
- Keep benchmark metadata focused on benchmark/run concerns.
KFP control-plane settings such as `experiment_name` belong in provider config (`kubeflow_config.experiment_name`, environment: `KUBEFLOW_EXPERIMENT_NAME`), not benchmark metadata.
23 changes: 22 additions & 1 deletion COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@ This document tracks the compatibility of `llama-stack-provider-trustyai-garak`

| Provider Version | Llama-Stack Version | Python Version | Key Dependencies | Status | Notes |
|------------------|---------------------|----------------|------------------|---------|-------|
| 0.1.3 | ==0.2.18 | >=3.12 | greenlet, httpx[http2], kfp, kfp-kubernetes, kfp-server-api, boto3, garak | Current | Latest stable release with thin dependencies and lazy kfp & s3 client init for remote mode |
| 0.2.0 | >=0.5.0 | >=3.12 | kfp>=2.14.6, kfp-kubernetes>=2.14.6, kfp-server-api>=2.14.6, boto3>=1.35.88 | Current | Current release with updated metadata schema (`metadata.garak_config`) and remote/inline support |
| 0.1.3 | ==0.2.18 | >=3.12 | greenlet, httpx[http2], kfp, kfp-kubernetes, kfp-server-api, boto3, garak | | Latest stable release with thin dependencies and lazy kfp & s3 client init for remote mode |
| 0.1.2 | >=0.2.15 | >=3.12 | fastapi, opentelemetry-api, opentelemetry-exporter-otlp, aiosqlite, greenlet, uvicorn, ipykernel, httpx[http2], kfp, kfp-kubernetes, kfp-server-api, boto3, garak | | Release with both remote and inline implementation |
| 0.1.1 | >=0.2.15 | >=3.12 | fastapi, opentelemetry-api, opentelemetry-exporter-otlp, aiosqlite, greenlet, uvicorn, ipykernel, httpx[http2], garak | | Initial stable release with inline implementation |

## Dependency Details

### Core Dependencies

#### Version 0.2.0 (latest)
- **llama-stack-client**: >=0.5.0
- **llama-stack-api**: >=0.5.0
- **llama-stack** (server extra): >=0.5.0
- **garak** (inline extra): ==0.14.0
- **kfp**: >=2.14.6
- **kfp-kubernetes**: >=2.14.6
- **kfp-server-api**: >=2.14.6
- **boto3**: >=1.35.88

#### Version 0.1.3
- **llama-stack**: == 0.2.18
- **greenlet**: Latest compatible (3.2.4)
Expand Down Expand Up @@ -68,6 +79,16 @@ The provider is built and compatible with:
- **Llama-Stack Version**: 0.2.18 (in container builds)
- **Additional Runtime Dependencies**: torch, transformers, sqlalchemy, and others as specified in the Containerfile

## Image Compatibility (Latest Deployments)

Use the table below as a quick reference for image fields used in current remote deployments.

| Use Case | Config Key / Field | Where to Set | Recommended Image | Alternative | Notes |
|---|---|---|---|---|---|
| LLS distro image (total remote) | `spec.distribution.image` | `lsd_remote/llama_stack_distro-setup/lsd-garak.yaml` | `quay.io/opendatahub/llama-stack@sha256:cf21d3919d265f8796ed600bfe3d2eb3ce797b35ab8e60ca9b6867e0516675e5` | `quay.io/rhoai/odh-llama-stack-core-rhel9:rhoai-3.4` | Pick image matching your RHOAI/ODH release stream |
| Garak KFP base image (total remote) | `KUBEFLOW_GARAK_BASE_IMAGE` | `lsd_remote/llama_stack_distro-setup/lsd-config.yaml` | `quay.io/opendatahub/odh-trustyai-garak-lls-provider-dsp:dev` | `quay.io/rhoai/odh-trustyai-garak-lls-provider-dsp-rhel9:rhoai-3.4` | Injected into LSD env via `lsd-garak.yaml` |
| Garak KFP base image (partial remote) | `kubeflow_config.garak_base_image` (env: `KUBEFLOW_GARAK_BASE_IMAGE`) | `demos/2-partial-remote/partial-remote.yaml` | `quay.io/opendatahub/odh-trustyai-garak-lls-provider-dsp:dev` | `quay.io/rhoai/odh-trustyai-garak-lls-provider-dsp-rhel9:rhoai-3.4` | Used by KFP components for scan/parse/validate steps |

## Breaking Changes

### Version 0.1.3
Expand Down
33 changes: 18 additions & 15 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,25 @@ COPY . .
# Build argument to specify architecture
ARG TARGETARCH=x86_64

# Install dependencies
RUN if [ "$TARGETARCH" = "amd64" ] || [ "$TARGETARCH" = "x86_64" ]; then \
echo "Installing x86_64 dependencies ..."; \
pip install --no-cache-dir -r requirements-x86_64.txt; \
elif [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \
echo "Installing ARM64 dependencies ..."; \
pip install --no-cache-dir -r requirements-aarch64.txt; \
else \
echo "ERROR: Unsupported architecture: $TARGETARCH"; \
exit 1; \
fi

# Install the package itself (--no-deps since dependencies already installed)
# # Install dependencies
# RUN if [ "$TARGETARCH" = "amd64" ] || [ "$TARGETARCH" = "x86_64" ]; then \
# echo "Installing x86_64 dependencies ..."; \
# pip install --no-cache-dir -r requirements-x86_64.txt; \
# elif [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \
# echo "Installing ARM64 dependencies ..."; \
# pip install --no-cache-dir -r requirements-aarch64.txt; \
# else \
# echo "ERROR: Unsupported architecture: $TARGETARCH"; \
# exit 1; \
# fi

# Install cpu torch to reduce image size
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu

# Install the package itself
# Use [inline] to get garak dependency
RUN pip install --no-cache-dir --no-deps -e ".[inline]"

RUN pip install --no-cache-dir ".[inline]"
RUN pip install --no-cache-dir -r requirements-inline-extra.txt
# Set XDG environment variables to use /tmp (always writable) for garak to write to
ENV XDG_CACHE_HOME=/tmp/.cache
ENV XDG_DATA_HOME=/tmp/.local/share
Expand Down
Loading
Loading