ImportError when importing cloned github repository

Hi All,
I’m trying to execute a python script in container.
This script imports a module from the remote repository.
So, in Dockerfile, RUN git clone {remote repository} is executed.
But, everytime I try to execute the script, ImportError comes out.

Could someone tell me why I’m facing this ImportError?

Not sure what’s causing the problem, but have you tried using ADD instead of running the Git command?

Also, as the image does not have use for the repository’s history, you may want to remove the .git folder, or make a multi-stage build and copy the repository’s relevant contents to the final image

Thanks for your answer.
I tested ADD instead of RUN.
But, it didn’t work for me.

I addressed it by just copying the remote repository after downloading it in local system.
But, I want to know why RUN git clone {remote repository} is not working.

I could use requirements.txt in the remote repository (i.e., RUN pip install -r {remote repository}/requirements.txt).
However, import is not working.