Skip to content

Commit e4bd32a

Browse files
committed
Update Dockerfile.hf
1 parent 3955709 commit e4bd32a

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

detectors/Dockerfile.hf

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,19 @@ RUN microdnf update -y && \
66
microdnf clean all
77
RUN pip install --no-cache-dir torch
88

9-
# FROM icr.io/fm-stack/ubi9-minimal-py39-torch as builder
109
FROM base as builder
1110

12-
COPY ./common/requirements.txt .
13-
RUN pip install --no-cache-dir -r requirements.txt
14-
15-
COPY ./huggingface/requirements.txt .
16-
RUN pip install --no-cache-dir -r requirements.txt
11+
RUN pip install --no-cache-dir \
12+
guardrails-detector-common \
13+
guardrails-detector-huggingface
1714

1815
FROM builder
1916

2017
WORKDIR /app
21-
ARG CACHEBUST=1
22-
RUN echo "$CACHEBUST"
23-
COPY ./common /common
24-
COPY ./huggingface/app.py /app
25-
COPY ./huggingface/detector.py /app
26-
COPY ./huggingface/scheme.py /app
18+
19+
# COPY tests/dummy_models /app/models
20+
# ENV MODEL_DIR=/app/models/bert/BertForSequenceClassification
2721

2822
EXPOSE 8000
29-
CMD ["uvicorn", "app:app", "--workers", "4", "--host", "0.0.0.0", "--port", "8000", "--log-config", "/common/log_conf.yaml"]
3023

31-
# gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000
24+
CMD ["python", "-m", "uvicorn", "guardrails_detector_huggingface.app:app", "--workers", "4", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)