Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use dunner with docker images whose entrypoint is defined #175

Open
apoorvam opened this issue Aug 27, 2019 · 5 comments
Open
Labels
enhancement New feature or request gsoc-2019 Implemented as part of GSoC 2019
Milestone

Comments

@apoorvam
Copy link
Collaborator

For Docker images whose entrypoint is defined and are run as an executable, Dunner fails to execute commands defined in it.

Example: Goreleaser's docker file.

Dunner task file:

tasks:
  release:
    steps:
      - image: goreleaser/goreleaser
        commands:
          - ["echo", "hello"]
          - ["goreleaser", "--version"]

Running this command with dunner fails with error as:

OCI runtime exec failed: exec failed: cannot exec a container that has stopped: unknown
FATA[2019-08-26 18:39:51] docker: command execution failed with exit code 126
@apoorvam apoorvam added the enhancement New feature or request label Aug 27, 2019
@apoorvam
Copy link
Collaborator Author

Solutions discussed:

Solution 1:

Combine all user commands and pass it as default command(instead of current tail -f /dev/null as default command to create container) to execute the shell script
Cons:

  • Script has to be OS specific
  • Might not be possible/hacky to get output of each command separately

Solution 2:

Find the entrypoint and override it with bash or cmd based on OS

Will research more on how this can be fixed and post update.

@apoorvam
Copy link
Collaborator Author

Resetting entrypoint seems to fix this issue. PR: #176

@apoorvam apoorvam added the gsoc-2019 Implemented as part of GSoC 2019 label Aug 27, 2019
@agentmilindu
Copy link
Contributor

agentmilindu commented Aug 27, 2019

What if the entry point is something like /app/src/python/main/analyze.py? Then someone who uses this docker needs to put this again and again in commands, right?

tasks:
  release:
    steps:
      - image: SCoRe/MLKit
        commands:
          - ["/app/src/python/main/analyzer.py", "analyze", "--algo","ImageNet"]

@apoorvam
Copy link
Collaborator Author

apoorvam commented Aug 27, 2019

Right, no default command/args will be set. User will have to use it in shell mode and not as an executable. @agentmilindu

@agentmilindu
Copy link
Contributor

Is some cases, users really don't know what is the entry point is. I strongly suggests against users having to define the entry point in commands.

WDYT @PratikDhanave @tdevinda @charithccmc @tharindupr @rehrumesh?

@agentmilindu agentmilindu added this to the v3.0.0 milestone Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gsoc-2019 Implemented as part of GSoC 2019
Projects
None yet
Development

No branches or pull requests

2 participants