Repeating Error with ir_datasets when building Docker image

ir_datasets is already installed as a python library, but when we tried to build the Docker image, it constantly fails to recognize the installation command for ir_datasets library. The error below occurs.

Dockerfile:11

9 |
10 | # Install any required packages
11 | >>> RUN pip install ir_datasets
12 |
13 | # Expose the port that the Jupyter notebook runs on

ERROR: failed to solve: process “/bin/bash -o pipefail -c pip install ir_datasets” did not complete successfully: exit code: 1

We’ve tried to restart the build by putting the following command:
docker build --no-cache -t luckycoincidence .

How can we deal with this situation?

Dear @Markkreel,

Thank you for reaching out!
Without the Dockerfile or a link to it, it is a bit difficult for me to help.

Currently, my best guess is that the program pip does not exist in the docker container.
Maybe it is pip3 instead of pip?

So can you please try RUN pip3 install ir_datasets instead of RUN pip install ir_datasets?
If this does not help, can you please copy your Dockerfile here or add a link to the git repository with the code?

Thanks in advance and best regards,
Maik