diff --git a/application/Dockerfile b/application/Dockerfile index d422db45..27213072 100644 --- a/application/Dockerfile +++ b/application/Dockerfile @@ -20,7 +20,7 @@ RUN if [ -f /usr/bin/python3.12 ]; then \ # Download and unzip the model RUN wget https://d3dg1063dc54p9.cloudfront.net/models/embeddings/mpnet-base-v2.zip && \ - unzip mpnet-base-v2.zip -d model && \ + unzip mpnet-base-v2.zip -d models && \ rm mpnet-base-v2.zip # Install Rust @@ -63,7 +63,8 @@ RUN groupadd -r appuser && \ # Copy the virtual environment and model from the builder stage COPY --from=builder /venv /venv -COPY --from=builder /model /app/model + +COPY --from=builder /models /app/models # Copy your application code COPY . /app/application diff --git a/application/vectorstore/base.py b/application/vectorstore/base.py index 9c76b89f..a6b206c9 100644 --- a/application/vectorstore/base.py +++ b/application/vectorstore/base.py @@ -75,9 +75,9 @@ class BaseVectorStore(ABC): openai_api_key=embeddings_key ) elif embeddings_name == "huggingface_sentence-transformers/all-mpnet-base-v2": - if os.path.exists("./model/all-mpnet-base-v2"): + if os.path.exists("./models/all-mpnet-base-v2"): embedding_instance = EmbeddingsSingleton.get_instance( - embeddings_name="./model/all-mpnet-base-v2", + embeddings_name = "./models/all-mpnet-base-v2", ) else: embedding_instance = EmbeddingsSingleton.get_instance( @@ -86,4 +86,5 @@ class BaseVectorStore(ABC): else: embedding_instance = EmbeddingsSingleton.get_instance(embeddings_name) - return embedding_instance \ No newline at end of file + return embedding_instance +