Skip to content

Commit 94d9027

Browse files
authored
Merge pull request trustyai-explainability#45 from red-hat-data-services/RHOAIENG-30264
Add konflux dockerfiles
2 parents 5a66b50 + 185c799 commit 94d9027

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

detectors/Dockerfile.konflux.builtIn

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM registry.access.redhat.com/ubi9/ubi-minimal as base
2+
RUN microdnf update -y && \
3+
microdnf install -y --nodocs \
4+
python-pip python-devel && \
5+
pip install --upgrade --no-cache-dir pip wheel && \
6+
microdnf clean all
7+
8+
# FROM icr.io/fm-stack/ubi9-minimal-py39-torch as builder
9+
FROM base as builder
10+
11+
COPY ./common/requirements.txt .
12+
RUN pip install --no-cache-dir -r requirements.txt
13+
14+
COPY ./built_in/requirements.txt .
15+
RUN pip install --no-cache-dir -r requirements.txt
16+
17+
FROM builder
18+
19+
WORKDIR /app
20+
ARG CACHEBUST=1
21+
RUN echo "$CACHEBUST"
22+
COPY ./common /app/detectors/common
23+
COPY ./built_in/* /app
24+
25+
EXPOSE 8080
26+
27+
# for backwards compatibility with existing k8s deployment configs
28+
RUN mkdir /app/bin &&\
29+
echo '#!/bin/bash' > /app/bin/regex-detector &&\
30+
echo "uvicorn app:app --workers 4 --host 0.0.0.0 --port 8080 --log-config /app/detectors/common/log_conf.yaml" >> /app/bin/regex-detector &&\
31+
chmod +x /app/bin/regex-detector
32+
CMD ["/app/bin/regex-detector"]
33+
34+
LABEL name="rhoai/odh-built-in-detector-rhel9" \
35+
com.redhat.component="odh-built-in-detector-rhel9" \
36+
io.k8s.display-name="odh-built-in-detector-rhel9" \
37+
io.k8s.description="The Guardrails Built-in Detector is a collection of quick text detection algorithms, bundled into a microservice for use with the FMS-Guardrails project. It provides a REST API endpoint that accepts text content and detector parameters, returning detailed detection results with position information and confidence scores for a variety of text detection paradigms, such as regex and file-type validation." \
38+
description="The Guardrails Built-in Detector is a collection of quick text detection algorithms, bundled into a microservice for use with the FMS-Guardrails project. It provides a REST API endpoint that accepts text content and detector parameters, returning detailed detection results with position information and confidence scores for a variety of text detection paradigms, such as regex and file-type validation." \
39+
summary="The Guardrails Built-in Detector is a collection of quick text detection algorithms, bundled into a microservice for use with the FMS-Guardrails project." \
40+
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

0 commit comments

Comments
 (0)