Spaces:
Runtime error
Runtime error
Merge pull request #4 from TuanaCelik/mayank/dockerfile
Browse files- Dockerfile +3 -3
- retriever_reader.yml +33 -0
Dockerfile
CHANGED
|
@@ -30,9 +30,9 @@ FROM $HAYSTACK_BASE_IMAGE
|
|
| 30 |
#RUN python3 -c "from haystack.utils.docker import cache_models;cache_models($hf_model_names, $hf_token)"
|
| 31 |
|
| 32 |
# To copy pipeline yml into the docker
|
| 33 |
-
ARG
|
| 34 |
-
ARG container_pipeline_path=/opt/
|
| 35 |
-
COPY $
|
| 36 |
|
| 37 |
# Exporting Pipeline path as an env variable
|
| 38 |
# Haystack reads this env variable to load the appropriate pipeline
|
|
|
|
| 30 |
#RUN python3 -c "from haystack.utils.docker import cache_models;cache_models($hf_model_names, $hf_token)"
|
| 31 |
|
| 32 |
# To copy pipeline yml into the docker
|
| 33 |
+
ARG repo_pipeline_path=retriever_reader.yml
|
| 34 |
+
ARG container_pipeline_path=/opt/pipelines/pipeline.yml
|
| 35 |
+
COPY $repo_pipeline_path $container_pipeline_path
|
| 36 |
|
| 37 |
# Exporting Pipeline path as an env variable
|
| 38 |
# Haystack reads this env variable to load the appropriate pipeline
|
retriever_reader.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
components:
|
| 2 |
+
- name: DocumentStore
|
| 3 |
+
type: InMemoryDocumentStore
|
| 4 |
+
- name: tfidf_ret
|
| 5 |
+
params:
|
| 6 |
+
document_store: DocumentStore
|
| 7 |
+
type: TfidfRetriever
|
| 8 |
+
- name: reader
|
| 9 |
+
params:
|
| 10 |
+
# set model_name_or_path HF model_name
|
| 11 |
+
model_name_or_path: deepset/minilm-uncased-squad2
|
| 12 |
+
# here we have used a base-cpu image
|
| 13 |
+
use_gpu: false
|
| 14 |
+
type: FARMReader
|
| 15 |
+
- name: TextFileConverter
|
| 16 |
+
type: TextConverter
|
| 17 |
+
pipelines:
|
| 18 |
+
- name: query
|
| 19 |
+
nodes:
|
| 20 |
+
- inputs: [Query]
|
| 21 |
+
name: tfidf_ret
|
| 22 |
+
- inputs: [tfidf_ret]
|
| 23 |
+
name: reader
|
| 24 |
+
- name: indexing
|
| 25 |
+
nodes:
|
| 26 |
+
- name: TextFileConverter
|
| 27 |
+
inputs: [ File ]
|
| 28 |
+
- name: tfidf_ret
|
| 29 |
+
inputs: [ TextFileConverter ]
|
| 30 |
+
- name: DocumentStore
|
| 31 |
+
inputs: [ tfidf_ret ]
|
| 32 |
+
version: ignore
|
| 33 |
+
|