Repository: erikbern/ann-benchmarks
Issue: Docker error when including own algorithm
Root cause: Validation Gap

Hi, I'm trying to include my own algorithm for my master thesis for a while now. The algorithm itself is tested and works with the built docker container after running `install.py`.
However, when running `run.py --dataset random-xxs-3-1000-euclidean --algorithm knn-gpu --batch` I get following error, which I don't understand:


`2022-01-31 11:54:36,923 - annb - INFO - running only knn-gpu
2022-01-31 11:54:37,095 - annb - INFO - Order: [Definition(algorithm='knn-gpu', constructor='KNN_GPU', module='ann_benchmarks.algorithms.knn-gpu', docker_tag='ann-benchmarks-knn-gpu', arguments=[], query_argument_groups=[], disabled=False)]
Process Process-1:

Traceback (most recent call last):
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\api\client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\requests\models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localnpipe/v1.41/containers/e93eacaa4af0d6c57f260b81d172624b39d9a8d41078bbab7767fe297de36719/start

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\multiprocessing\process.py", line 258, in _bootstrap
    self.run()
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\CAJSc\Documents\Repos\ann-benchmarks\ann_benchmarks\main.py", line 49, in run_worker
    args.runs, args.timeout, args.batch, cpu_limit, mem_limit)
  File "C:\Users\CAJSc\Documents\Repos\ann-benchmarks\ann_benchmarks\runner.py", line 244, in run_docker
    detach=True)
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\models\containers.py", line 826, in run
    container.start()
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\models\containers.py", line 404, in start
    return self.client.api.start(self.id, **kwargs)
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\utils\decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\api\container.py", line 1109, in start
    self._raise_for_status(res)
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\api\client.py", line 270, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "C:\Users\CAJSc\anaconda3\envs\ann-benchmark\lib\site-packages\docker\errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 400 Client Error for http+docker://localnpipe/v1.41/containers/e93eacaa4af0d6c57f260b81d172624b39d9a8d41078bbab7767fe297de36719/start: Bad Request ("OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "--dataset": executable file not found in $PATH: unknown")`

The other algorithms work fine with this command.

I would be grateful for some help on this, thank you!

EDIT: here are some snippets of the code I used to integrate my algorithm (as explained in the readme):
algo.yaml:
knn-gpu:
      docker-tag: ann-benchmarks-knn-gpu
      module: ann_benchmarks.algorithms.knn-gpu
      constructor: KNN_GPU
      run-groups:
        empty:
          args: []


[knn-gpu.txt](https://github.com/erikbern/ann-benchmarks/files/7971340/knn-gpu.txt)
[Dockerfile.knn-gpu.txt](https://github.com/erikbern/ann-benchmarks/files/7971346/Dockerfile.knn-gpu.txt)



Found the error, my Dockerfile was to blame.