Alon
Alon

Reputation: 11895

docker: Error response from daemon: OCI runtime create failed: no such file or directory": unknown

I have a python project that's working fine. This is its setup.py:

from setuptools import setup

setup(
    name='project',
    version='0.4.2',
    packages=['project', 'project.models', 'project.modules', 'project.transforms'],
    url='http://12.3.4.100/team/project',
    license='',
    author='author1, author2',
    author_email='[email protected], [email protected]',
    description='Some text',
    scripts=[
        'scripts/do_something'
    ],
    install_requires=[
        'dependency1 >= 0.3.5',
        'torch >= 1.0.0',
        'dependency3 == 0.1.2',
        'numpy >= 1.15.0'
    ],
)

Now I'm dockerizing this project. So I've created a Dockerfile:

FROM pytorch/pytorch:1.5.1-cuda10.1-cudnn7-runtime

COPY project /project
COPY scripts /scripts
COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt --trusted-host 12.3.4.167 --extra-index-url http://12.3.4.167:8081/repository/team-python/simple

ENTRYPOINT ["scripts/do_something"]

But when I run the image I'm getting an error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "scripts/do_something": stat scripts/do_something: no such file or directory": unknown

I've been trying to google it for hours but still haven't figured out what I'm missing.

Please let me know if you need any more information.

Upvotes: 2

Views: 934

Answers (1)

kerasbaz
kerasbaz

Reputation: 1794

There are several potential issues here. Your current issue is the disconnect between /scripts and scripts/do_something -- one assumes a full path from root, the other is a relative path. Pick one and use it in both places.

You may also have permissions issues if your docker host is windows-based instead of linux (since you aren't calling python against the file and have not chmodded it).

Upvotes: 1

Related Questions