File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ghcr.io/astral-sh/uv:python3.13-trixie-slim@sha256:69ef6514bf9b7de044514258356fa68a2d94df2e5dc807b5bfbf88fbb35f3a58 AS builder
2+
3+ ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
4+ WORKDIR /app
5+
6+ COPY src/ pyproject.toml MANIFEST.in ./
7+ RUN uv sync --no-dev --no-editable
8+
9+
10+ FROM python:3.13-slim-trixie@sha256:47b6eb1efcabc908e264051140b99d08ebb37fd2b0bf62273e2c9388911490c1 AS runtime
11+
12+ RUN groupadd -r metisuser && useradd -r -g metisuser metisuser
13+
14+ WORKDIR /app
15+
16+ COPY --from=builder --chown=metisuser:metisuser /app/.venv /app/.venv
17+
18+ ENV PATH="/app/.venv/bin:$PATH"
19+
20+ WORKDIR /metis
21+
22+ USER metisuser
23+ ENTRYPOINT ["metis" ]
Original file line number Diff line number Diff line change @@ -78,6 +78,16 @@ To install with **PostgreSQL (pgvector)** backend support:
7878uv pip install ' .[postgres]'
7979```
8080
81+ ### 1.1 ** Docker**
82+
83+ ``` bash
84+ git clone https://github.com/arm/metis.git
85+
86+ cd metis
87+
88+ docker build -t metis .
89+ ```
90+
8191### 2. ** Set up LLM Provider**
8292
8393** OpenAI**
@@ -104,6 +114,24 @@ Finally, run the security analysis across the entire codebase with:
104114```
105115review_code
106116```
117+
118+ ### 3.1 Docker
119+
120+ Go to your codebase path and run:
121+ ``` bash
122+ docker run --rm -it -v ` pwd` :/metis metis
123+ ```
124+
125+ To pass environment variables use ` -e ` :
126+ ``` bash
127+ docker run --rm -it -v ` pwd` :/metis -e " OPENAI_API_KEY=${OPENAI_API_KEY} " metis
128+ ```
129+
130+ You can pass arguments to metis:
131+ ``` bash
132+ docker run --rm -it -v ` pwd` :/metis metis --non-interactive --command ' review_code' --output-file results/review_code_results.json
133+ ```
134+
107135## Configuration
108136
109137** Metis Configuration (` metis.yaml ` )**
You can’t perform that action at this time.
0 commit comments