Repository: erikbern/ann-benchmarks
Issue: FileNotFoundError: [Errno 2] No such file or directory
Root cause: Environment Incompatibility

I cloned ann-benchmark on my rock 9.2. I ran "pip install -r requirements.txt". Next, I ran "python install.py". However, it seemed the install had failed.

Install Status:                                                                                                                                              
{'redisearch': 'success'}
{'nmslib': 'success'}
{'opensearchknn': 'success'}
{'py': 'fail'}
{'tinyknn': 'fail'}
{'mrpt': 'success'}
{'diskann': 'fail'}
{'elasticsearch': 'success'}
{'glass': 'success'}
{'faiss_gpu': 'success'}
{'flann': 'success'}
{'kgraph': 'fail'}
{'balltree': 'success'}
{'pgvector': 'success'}
{'rpforest': 'fail'}
{'elastiknn': 'success'}
{'puffinn': 'success'}
{'dolphinnpy': 'success'}
{'hnswlib': 'success'}
{'n2': 'success'}
{'nearpy': 'fail'}
{'qsg_ngt': 'success'}
{'dummy_algo': 'success'}
{'pynndescent': 'success'}
{'vald': 'success'}
{'milvus': 'fail'}
{'onng_ngt': 'success'}
{'datasketch': 'success'}
{'__pycache__': 'fail'}
{'sptag': 'fail'}
{'nndescent': 'success'}
{'panng_ngt': 'success'}
{'scann': 'success'}
{'vespa': 'success'}
{'faiss_hnsw': 'success'}
{'qg_ngt': 'success'}
{'kdtree': 'success'}
{'faiss': 'success'}
{'qdrant': 'success'}
{'base': 'success'}
{'ckdtree': 'success'}
{'bruteforce': 'success'}
{'vearch': 'success'}
{'annoy': 'success'}
{'weaviate': 'success'}
{'luceneknn': 'success'}
{'subprocess': 'fail'}

Just looking at subprocess, I saw the subprocess directory did not have Dockerfile. Was this on purpose?

#> ls ann_benchmarks/algorithms/subprocess
config.yml  module.py

I decided to give "python run.py" a try.

#> python run.py                                                                                                                                                                                                                              
downloading https://ann-benchmarks.com/glove-100-angular.hdf5 -> data/glove-100-angular.hdf5...
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 496, in _make_request
    conn.request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 395, in request
    self.endheaders()
  File "/usr/lib64/python3.9/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.9/http/client.py", line 1040, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.9/http/client.py", line 980, in send
    self.connect()
  File "/usr/local/lib/python3.9/site-packages/docker/transport/unixconn.py", line 27, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 844, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 470, in increment
    raise reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/util.py", line 38, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 496, in _make_request
    conn.request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 395, in request
    self.endheaders()
  File "/usr/lib64/python3.9/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.9/http/client.py", line 1040, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.9/http/client.py", line 980, in send
    self.connect()
  File "/usr/local/lib/python3.9/site-packages/docker/transport/unixconn.py", line 27, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/local/lib/python3.9/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/local/lib/python3.9/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/ann-benchmarks/run.py", line 7, in <module>
    main()
  File "/root/ann-benchmarks/ann_benchmarks/main.py", line 331, in main
    definitions = filter_by_available_docker_images(definitions)
  File "/root/ann-benchmarks/ann_benchmarks/main.py", line 189, in filter_by_available_docker_images
    docker_client = docker.from_env()
  File "/usr/local/lib/python3.9/site-packages/docker/client.py", line 96, in from_env
    return cls(
  File "/usr/local/lib/python3.9/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

Where are these files?

you should install python3.10+ and follow the prerequisite . 

![image](https://github.com/erikbern/ann-benchmarks/assets/104393458/d1794fc1-c4f7-417a-ba7f-ccb035c07201)

and I used : 
![image](https://github.com/erikbern/ann-benchmarks/assets/104393458/9d22edd4-1016-4f57-9c25-d7a57fef006f)



@nioboy I've never tried to run it on rocky linux, so I'm not sure how to move forward. My guess is that you might miss the user rights to run the docker containers? 

I'm going to try Ubuntu, since I got an error from docker stating it does not support Rocky. Also, I was running as the root user on Rocky.

After getting the latest Ubuntu, I was able to get the benchmark working. Thanks.