Problem: minicanda3 virtual environment creates a python environment, and uses the following dockerfile to compile the docker image
FROM cuda10.2_pt1.5:09061
COPY . /workspace
WORKDIR /workspace
CMD ["python","run.py","/input_path","/output_path"]
Error using:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown.
Try to add an environment variable. It takes effect in the container after adding, and python can be recognized. However, after the build image, python still has the same problem, and python cannot be recognized
EXPORT PATH="/root/miniconda3/bin:&PATH"
Try to establish a soft connection to python
ln -s /root/miniconda3/bin/python /usr/bin/python
It takes effect in the container after adding, and python can be recognized, but there is still an error after using the build image
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/root/miniconda3/bin/path\": stat /root/miniconda3/bin/path: no such file or directory": unknown.
Analysis: an automatically executed command cannot locate the executable location
Solution: since Python for short cannot be located, just give the complete path directly./root/minikonda3/bin/python. Meanwhile, refer to some schemes and use run to add some necessary environments. The modified dockerfile is as follows:
FROM cuda10.2_pt1.5:09061
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
curl \
ca-certificates \
libjpeg-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
COPY . /workspace
WORKDIR /workspace
CMD ["/root/miniconda3/bin/python","run.py","/input_path","/output_path"]
Read More:
- Docker run failed with the following error in logs, standard_ init_ linux.go:211 : exec user process caused “exec format error“
- Error response from daemon: OCI runtime exec failed: exec failed: container_linux.go:345:
- Get connection timeout retry: 1 MySQL errorcode 0, state 08s01 docker container accessing MySQL container is very slow and sometimes interrupted
- Error: path not specified when the docker 1.7 file is uploaded to the container in CentOS
- Installing opencv Python in docker container
- standard_init_linux.go:178: exec user process caused “no such file or directory”
- standard_init_linux.go:211: exec user process caused “exec format error”
- The docker copies the win10 host file into the docker container. An error is reported: copying between containers is not supported
- [Solved] Docker Container Use APT error: Permission denied
- View the IP address of the docker container
- Docker start error: failed to start docker application container engine.
- error starting container: API error (404): network fabric_test not found“
- Caused by: org.apache.catalina.LifecycleException: A child container failed during start
- An error occurred when starting Tomcat in Eclipse: the sub container failed to start
- Docker starts MySQL container and reports an error driver failed programming external connectivity on endpoint mysq
- Error — failed to start docker container, error iptables — wait – t nat
- When docker creates a container command: Error response from daemon: No command specified
- Starting zookeeper to report an error already running as process
- Docker creation container cannot find network card: error response from daemon: network XXXX not found
- Docker Nacos deployment uses container name to access 400 bad request