Repository: deepset-ai/haystack

Issue:
Pinned outdated dependencies
Perhaps this isn't a bug, per se, but there seem to be various dependencies that are pinned to outdated versions. 

For example, throughout the codebase you seem to be using Tika `1.24.1`, which was released over 2 years ago. The current version is 2.4.1. At the very least it could be `apache/tika:1.28.4` (if there's a conflict with v2), or probably even `apache/tika:latest`? 

![image](https://user-images.githubusercontent.com/88559987/187986334-e0aed27b-cfc5-466b-a3f6-a399137ca7d6.png)

Likewise, in [pyproject.toml](https://github.com/deepset-ai/haystack/blob/main/pyproject.toml) you seem to be using `pytesseract v0.3.7`, which is nearly two years old as well. `0.3.10` is the latest version. https://github.com/madmaze/pytesseract/releases Though, it does appear that you install the most recent version of tesseract, so perhaps this is less important than Tika. 

`pdf2image==1.14.0`, which is 2 years old. Though the most recent `1.16.0` is over 1 year old and the project seems to be largely abandonned. https://github.com/Belval/pdf2image/releases

`pydoc-markdown==4.5.1`, which is only 6 months old. Though it literally has a comment `FIXME Unpin!` https://pypi.org/project/pydoc-markdown/#history

There's various other pinned dependencies, though they seem more recent and therefore more likely to be deliberate. But perhaps you'd like to make them `>= x, <y` as you have for most other packages?
* transformers==4.21.2
* azure-ai-formrecognizer==3.2.0b2
* weaviate-client==3.6.0
* grpcio==1.47.0
* black[jupyter]==22.6.0
 
There's also other Docker images that are outdated. 
* elasticsearch:7.9.2 (I know you're aware of and working on this)
* opensearch:1.2.4
* weaviate:1.11.0

Of course, I'm new to Haystack and don't know the codebase at all, so please disregard any of this if it is a non-issue. But I hope this is helpful in some way!


Discussion:

Resolving patch:
diff --git a/haystack/nodes/file_converter/tika.py b/haystack/nodes/file_converter/tika.py
--- a/haystack/nodes/file_converter/tika.py
+++ b/haystack/nodes/file_converter/tika.py
@@ -29,7 +29,7 @@ def launch_tika(sleep=15, delete_existing=False):
         _ = subprocess.run([f"docker rm --force {TIKA_CONTAINER_NAME}"], shell=True, stdout=subprocess.DEVNULL)
     status = subprocess.run(
         [
-            f"docker start {TIKA_CONTAINER_NAME} > /dev/null 2>&1 || docker run -p 9998:9998  --name {TIKA_CONTAINER_NAME} apache/tika:1.24.1"
+            f"docker start {TIKA_CONTAINER_NAME} > /dev/null 2>&1 || docker run -p 9998:9998  --name {TIKA_CONTAINER_NAME} apache/tika:1.28.4"
         ],
         shell=True,
     )
@@ -102,7 +102,7 @@ def __init__(
         if ping.status_code != 200:
             raise Exception(
                 f"Apache Tika server is not reachable at the URL '{tika_url}'. To run it locally"
-                f"with Docker, execute: 'docker run -p 9998:9998 apache/tika:1.24.1'"
+                f"with Docker, execute: 'docker run -p 9998:9998 apache/tika:1.28.4'"
             )
         self.tika_url = tika_url
         super().__init__(remove_numeric_tables=remove_numeric_tables, valid_languages=valid_languages)
diff --git a/haystack/utils/doc_store.py b/haystack/utils/doc_store.py
--- a/haystack/utils/doc_store.py
+++ b/haystack/utils/doc_store.py
@@ -46,7 +46,7 @@ def launch_opensearch(sleep=15, delete_existing=False):
         _ = subprocess.run([f"docker rm --force {OPENSEARCH_CONTAINER_NAME}"], shell=True, stdout=subprocess.DEVNULL)
     status = subprocess.run(
         [
-            f'docker start {OPENSEARCH_CONTAINER_NAME} > /dev/null 2>&1 || docker run -d -p 9201:9200 -p 9600:9600 -e "discovery.type=single-node" --name {OPENSEARCH_CONTAINER_NAME} opensearchproject/opensearch:1.2.4'
+            f'docker start {OPENSEARCH_CONTAINER_NAME} > /dev/null 2>&1 || docker run -d -p 9201:9200 -p 9600:9600 -e "discovery.type=single-node" --name {OPENSEARCH_CONTAINER_NAME} opensearchproject/opensearch:1.3.5'
         ],
         shell=True,
     )
@@ -65,7 +65,7 @@ def launch_weaviate(sleep=15):
     logger.debug("Starting Weaviate ...")
     status = subprocess.run(
         [
-            f"docker start {WEAVIATE_CONTAINER_NAME} > /dev/null 2>&1 || docker run -d -p 8080:8080 --env AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED='true' --env PERSISTENCE_DATA_PATH='/var/lib/weaviate' --name {WEAVIATE_CONTAINER_NAME} semitechnologies/weaviate:1.11.0"
+            f"docker start {WEAVIATE_CONTAINER_NAME} > /dev/null 2>&1 || docker run -d -p 8080:8080 --env AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED='true' --env PERSISTENCE_DATA_PATH='/var/lib/weaviate' --name {WEAVIATE_CONTAINER_NAME} semitechnologies/weaviate:1.14.0"
         ],
         shell=True,
     )


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -656,7 +656,7 @@ jobs:
 
     - name: Run Opensearch
       run: |
-        docker run -d -p 9201:9200 -p 9600:9600 -e "discovery.type=single-node" opensearchproject/opensearch:1.2.4
+        docker run -d -p 9201:9200 -p 9600:9600 -e "discovery.type=single-node" opensearchproject/opensearch:1.3.5
 
     - name: Run Milvus
       run: |
@@ -672,7 +672,7 @@ jobs:
       run: docker run -d -p 7200:7200 --name haystack_test_graphdb deepset/graphdb-free:9.4.1-adoptopenjdk11
 
     - name: Run Apache Tika
-      run: docker run -d -p 9998:9998 -e "TIKA_CHILD_JAVA_OPTS=-JXms128m" -e "TIKA_CHILD_JAVA_OPTS=-JXmx128m" apache/tika:1.24.1
+      run: docker run -d -p 9998:9998 -e "TIKA_CHILD_JAVA_OPTS=-JXms128m" -e "TIKA_CHILD_JAVA_OPTS=-JXmx128m" apache/tika:1.28.4
 
     - name: Run Parsr
       run: docker run -d -p 3001:3001 axarev/parsr:v1.2.2
diff --git a/test/conftest.py b/test/conftest.py
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -423,7 +423,7 @@ def weaviate_fixture():
         print("Starting Weaviate servers ...")
         status = subprocess.run(["docker rm haystack_test_weaviate"], shell=True)
         status = subprocess.run(
-            ["docker run -d --name haystack_test_weaviate -p 8080:8080 semitechnologies/weaviate:1.11.0"], shell=True
+            ["docker run -d --name haystack_test_weaviate -p 8080:8080 semitechnologies/weaviate:1.14.1"], shell=True
         )
         if status.returncode:
             raise Exception("Failed to launch Weaviate. Please check docker container logs.")
@@ -460,7 +460,7 @@ def tika_fixture():
             raise Exception("Unable to connect Tika. Please check tika endpoint {0}.".format(tika_url))
     except:
         print("Starting Tika ...")
-        status = subprocess.run(["docker run -d --name tika -p 9998:9998 apache/tika:1.24.1"], shell=True)
+        status = subprocess.run(["docker run -d --name tika -p 9998:9998 apache/tika:1.28.4"], shell=True)
         if status.returncode:
             raise Exception("Failed to launch Tika. Please check docker container logs.")
         time.sleep(30)