I have built a docker image on my ubuntu machine (Ubuntu 20.04) and I am now trying to get it running. However, I seem to get the same error every time no matter what. My base image for the docker container is python:3.7.6-stretch
This is my docker file:
FROM python:3.7.6-stretch
USER 0
RUN apt-get update && apt-get install coreutils
RUN apt-get -y install libc-dev
RUN apt-get -y install build-essential
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir /opt/files
COPY . /opt/files
ENTRYPOINT ["python", "./opt/files/training.py"]
My requirements.txt:
mxnet-cu100
gluoncv
nvidia-smi
Command for running the container: (The Imageset for the AI python script is stored locally on the machine, which is why I am passing the location of it as a parameter. Also I am trying to utilise my GPU.)
docker run -v ~/TrainingData/voc:/opt/files/ --gpus all -it ai_training:learningrate_0.001
The error I am getting when running the container:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown.
I have tried changing the entry point by specifying the python version like this:
ENTRYPOINT ["python3", "./opt/files/training.py"]
This however throws the same exact error. In fact I seem to think that the entry point is not the key to the solution here, as I get the same error regardless of what I put as my entry point. I have also tried searching for this issue on the internet but there are only a handful of posts and none of them seem to work for me.
I have also tried using a completely different base image without any results. The error stays the same.
Thank you! Please keep in mind that I am new to Docker.