forked from yudhiesh/llms-in-production-week-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 818 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.10-slim-bullseye
ARG GUARDRAILS_TOKEN
ARG OPENAI_API_KEY
ENV APP_HOME /app
ENV PYTHONPATH=$APP_HOME
ENV GUARDRAILS_TOKEN=$GUARDRAILS_TOKEN
ENV OPENAI_API_KEY=$OPENAI_API_KEY
WORKDIR $APP_HOME
COPY ./requirements.txt /app/requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential gcc git \
&& pip install --no-cache-dir --upgrade -r /app/requirements.txt \
&& guardrails configure --disable-metrics --disable-remote-inferencing --token $GUARDRAILS_TOKEN \
&& guardrails hub install hub://guardrails/valid_sql \
&& rm -rf /var/lib/apt/lists/*
# Add more guardrails to be installed in this chained RUN command!
COPY src ./src
COPY .streamlit ./.streamlit
EXPOSE 8080
CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port", "8080"]