mirror of
https://github.com/katanemo/plano.git
synced 2026-04-27 09:46:28 +02:00
* add toxic/jailbreak model * fix path loading model * fix syntax * fix bug,lint, format * fix bug * formatting * add parallel + chunking * fix bug * working version * fix onnnx name erorr * device * fix jailbreak config * fix syntax error * format * add requirement + cli download for dockerfile * add task * add skeleton change for envoy filter for prompt guard * fix hardware config * fix bug * add config changes * add gitignore * merge main * integrate arch-guard with filter * add hardware config * nothing * add hardware config feature * fix requirement * fix chat ui * fix onnx * fix lint * remove non intel cpu * remove onnx * working version * modify docker * fix guard time * add nvidia support * remove nvidia * add gpu * add gpu * add gpu support * add gpu support for compose * add gpu support for compose * add gpu support for compose * add gpu support for compose * add gpu support for compose * fix docker file * fix int test * correct gpu docker * upgrad python 10 * fix logits to be gpu compatible * default to cpu dockerfile * resolve comments * fix lint + unused parameters * fix * remove eetq install for cpu * remove deploy gpu --------- Co-authored-by: Adil Hafeez <adil@katanemo.com>
48 lines
1.3 KiB
Docker
48 lines
1.3 KiB
Docker
FROM python:3.10 AS base
|
|
|
|
#
|
|
# builder
|
|
#
|
|
FROM base AS builder
|
|
|
|
WORKDIR /src
|
|
RUN pip install --upgrade pip
|
|
|
|
# Install git (needed for cloning the repository)
|
|
RUN apt-get update && apt-get install -y git && apt-get clean
|
|
|
|
COPY requirements.txt /src/
|
|
|
|
RUN pip install --prefix=/runtime --force-reinstall -r requirements.txt
|
|
|
|
COPY . /src
|
|
|
|
#
|
|
# output
|
|
#
|
|
|
|
FROM python:3.10-slim AS output
|
|
|
|
# specify list of models that will go into the image as a comma separated list
|
|
# following models have been tested to work with this image
|
|
# "sentence-transformers/all-MiniLM-L6-v2,sentence-transformers/all-mpnet-base-v2,thenlper/gte-base,thenlper/gte-large,thenlper/gte-small"
|
|
ENV MODELS="BAAI/bge-large-en-v1.5"
|
|
ENV NER_MODELS="urchade/gliner_large-v2.1"
|
|
|
|
COPY --from=builder /runtime /usr/local
|
|
|
|
COPY /app /app
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# comment it out for now as we don't want to download the model every time we build the image
|
|
# we will mount host cache to docker image to avoid downloading the model every time
|
|
# see docker-compose file for more details
|
|
|
|
# RUN python install.py && \
|
|
# find /root/.cache/torch/sentence_transformers/ -name onnx -exec rm -rf {} +
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|