olamidegoriola pvanand commited on
Commit
e5d9f9d
·
1 Parent(s): a6f4db6

Update dockerfile to generate faiss index (#9)

Browse files

- Update dockerfile to generate faiss index (a0dc0cc1043f8b204bcf2b8e871276f7f18f9e70)


Co-authored-by: Anand <pvanand@users.noreply.huggingface.co>

Files changed (1) hide show
  1. 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
- # Run the application.
40
- #CMD ["run","--enable-api","--port","7860"]
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"]