李坤洪
李坤洪

Reputation: 1

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed

How to run a nvidia cuda image?

Here is the details about the image and how I have tried to run it but failed.

I just use this dockerfile to build the docker

FROM nvidia/cuda:12.6.0-devel-ubuntu20.04
CMD /bin/bash

But when I want to run a container

sudo docker run -it --rm --env=PATH=/usr/sbin:/usr/bin:/sbin:/bin --workdir=/workspace --name ubuntu kunb:base12.6

An error is reported:

docker: Error response from daemon: no command specified. See 'docker run --help'.

Then I inspect the image, here is the details:

[
     {
         "Id": "sha256:dc932efd7268183495137be0ee40e889ce35b833d6800fe09392ab5e98a1794f",
         "RepoTags": [
             "kunb:base12.6"
         ],
         "RepoDigests": [],
         "Parent": "",
         "Comment": "Imported from -",
         "Created": "2024-10-14T06:59:11.018823508Z",
         "DockerVersion": "27.3.1",
         "Author": "",
         "Config": {
             "Hostname": "",
             "Domainname": "",
             "User": "",
             "AttachStdin": false,
             "AttachStdout": false,
             "AttachStderr": false,
             "Tty": false,
             "OpenStdin": false,
             "StdinOnce": false,
             "Env": null,
             "Cmd": null,
             "Image": "",
             "Volumes": null,
             "WorkingDir": "",
             "Entrypoint": null,
             "OnBuild": null,
             "Labels": null
         },
         "Architecture": "amd64",
         "Os": "linux",
         "Size": 7163571214,
         "GraphDriver": {
             "Data": {
                 "MergedDir": "/var/lib/docker/overlay2/5ffe24a1d85e06ad0ab082a228544dfa5fc196c702ee95ddecb72b84495bed84/merged",
                 "UpperDir": "/var/lib/docker/overlay2/5ffe24a1d85e06ad0ab082a228544dfa5fc196c702ee95ddecb72b84495bed84/diff",
                 "WorkDir": "/var/lib/docker/overlay2/5ffe24a1d85e06ad0ab082a228544dfa5fc196c702ee95ddecb72b84495bed84/work"
             },
             "Name": "overlay2"
         },
         "RootFS": {
             "Type": "layers",
             "Layers": [
                 "sha256:6117ce94b9926a727c0fd48491ae94cf651e55f79fae4e72b03999532026af95"
             ]
         },
         "Metadata": {
             "LastTagTime": "2024-10-14T06:59:11.020770773Z"
         }
     }
 ]

and I switch to this command:

sudo docker run -it --rm --env=PATH=/usr/sbin:/usr/bin:/sbin:/bin --workdir=/workspace --entrypoint=sh --name ubuntu kunb:base12.6

get error:

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown.

and this command:

sudo docker run -it --rm --env=PATH=/usr/sbin:/usr/bin:/sbin:/bin --workdir=/workspace --entrypoint=/bin/sh --name ubuntu kunb:base12.6

with this error:

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown.

See above details including all I have tried

Upvotes: 0

Views: 369

Answers (0)

Related Questions