I am using Docker for windows. I am trying to send a csv file as an input to a python file, as an argument to docker run. The python file accepts a file as an input, which can be seen from the following snippet.
my_data = genfromtxt(sys.argv[1], delimiter=',')
The dockerfile looks like following.
#install ubuntu and python
USER changepoint #create user changepoint
WORKDIR /home/changepoint/ # change to directory changepoint
COPY CPDetection.py /home/changepoint/ #copy python file to directory
ENTRYPOINT ["python3.5","CPDetection.py"] # create an entrypoint
CMD ["foo1.csv"] #placeholder to accept input file
I am mounting the host folder to a volume in docker, then mentioning the input file as an argument, but i am getting the error
OSError: file.csv not found.
The command i am using to send the input is following (in powershell)
docker run -v C:/folder/:\home\changepoint\ -t changepoint npdata.csv
C:/folder contains the npdata.csv file, and i am mounting it to /home/changepoint, but i am not sure if the mount is successful, given that i am getting the error that file could not be found.
How can i resolve this?