1

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.

Luca01
  • 23
  • 4
  • How are you running the container? The relative `./opt` vs absolute `/opt` path might make a difference, though not for the specific error you quote. – David Maze Jul 15 '20 at 16:53
  • Because I want to utilise my GPU for my python script, I am using the following command: docker run -v ~/TrainingData/voc:/opt/files/ --gpus all -it ai_training:learningrate_0.001 The images for the AI is stored locally on the Computer, which is why I am passing the location of the imageset in the command. (Should not make a difference, in my opinion) – Luca01 Jul 15 '20 at 17:46

0 Answers0