Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +26 -5
Dockerfile
CHANGED
|
@@ -1,8 +1,29 @@
|
|
| 1 |
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
app:
|
| 6 |
-
- command: rasa run --enable-api --cors "*" --port 5002
|
| 7 |
-
- command: python app.py
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
|
| 3 |
+
# Use an official Python image as the base
|
| 4 |
+
FROM python:3.10
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# Set working directory
|
| 7 |
+
WORKDIR /app
|
| 8 |
+
|
| 9 |
+
# Copy project files
|
| 10 |
+
COPY . /app
|
| 11 |
+
|
| 12 |
+
# Install system dependencies
|
| 13 |
+
RUN apt-get update && apt-get install -y curl
|
| 14 |
+
|
| 15 |
+
# Install Python dependencies
|
| 16 |
+
RUN pip install --upgrade pip
|
| 17 |
+
RUN pip install -r requirements.txt
|
| 18 |
+
|
| 19 |
+
# Install Rasa
|
| 20 |
+
RUN pip install rasa
|
| 21 |
+
|
| 22 |
+
# Train Rasa model (if not already trained)
|
| 23 |
+
RUN rasa train
|
| 24 |
+
|
| 25 |
+
# Expose ports
|
| 26 |
+
EXPOSE 5005 7860
|
| 27 |
+
|
| 28 |
+
# Start both Rasa and Gradio
|
| 29 |
+
CMD rasa run --enable-api --cors "*" & python app.py
|