Spaces:
Runtime error
Runtime error
Update dockerfile to generate faiss index
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -28,18 +28,19 @@ COPY . .
|
|
| 28 |
# Create a non-privileged user that the app will run under.
|
| 29 |
# See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
|
| 30 |
# Switch to the non-privileged user to run the application.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
USER 1001
|
| 32 |
|
| 33 |
-
# set entrypoint for interactive shells
|
| 34 |
ENTRYPOINT [ "rasa" ]
|
| 35 |
|
| 36 |
# Expose the port that the application listens on.
|
| 37 |
EXPOSE 7860
|
| 38 |
|
| 39 |
-
#
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
# List of models: Arpit-v1.1.tar.gz, central+careersv1.0.tar.gz,Maisam+Arpit+anand+pankaj-bot-v1.0.tar.gz
|
| 43 |
|
| 44 |
# To specify model path
|
| 45 |
CMD ["run","actions","--port","7860"]
|
|
|
|
| 28 |
# Create a non-privileged user that the app will run under.
|
| 29 |
# See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
|
| 30 |
# Switch to the non-privileged user to run the application.
|
| 31 |
+
|
| 32 |
+
# Run the Python script to generate the FAISS index and save the model.
|
| 33 |
+
RUN python create_faiss_index.py
|
| 34 |
+
|
| 35 |
USER 1001
|
| 36 |
|
|
|
|
| 37 |
ENTRYPOINT [ "rasa" ]
|
| 38 |
|
| 39 |
# Expose the port that the application listens on.
|
| 40 |
EXPOSE 7860
|
| 41 |
|
| 42 |
+
# Get secret openai and mount it
|
| 43 |
+
RUN --mount=type=secret,id=openai,mode=0444,required=true
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# To specify model path
|
| 46 |
CMD ["run","actions","--port","7860"]
|