# Use Python 3.8 slim | |
FROM python:3.8-slim | |
WORKDIR /app | |
# 2) Install Rasa 2.8.3 from source (patch typing-extensions) | |
RUN pip install --no-cache-dir 'protobuf<3.20.0' rasa==2.8.3 rasa-sdk==2.8.3 | |
# 7) Copy in your Rasa project | |
COPY domain.yml config.yml endpoints.yml /app/ | |
COPY data /app/data | |
COPY actions /app/actions | |
COPY custom_components /app/custom_components | |
# 9) Train your model (writes into /app/models) | |
RUN rasa train | |
# 10) Install Gradio v4 + HTTP client | |
COPY requirements.txt /app/requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
RUN pip install --no-cache-dir numpy==1.19.5 | |
RUN pip show numpy | |
# 11) Copy your Gradio wrapper | |
COPY app.py /app/app.py | |
# 12) Expose ports (actions, Rasa API, Gradio UI) | |
EXPOSE 5055 5005 7860 | |
# 13) Launch everything: action server, Rasa REST API, then Gradio | |
ENTRYPOINT ["bash","-lc","rasa run actions & rasa run --enable-api --port 5005 & python app.py"] | |