question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker: clean build from source fails with tmp/docker-build###/serve: no such file or dir

See original GitHub issue

Brand new Ubuntu install (EC2), latest github source for serve, latest docker etc.:

1 - sudo docker build --file Dockerfile.cpu -t torchserve:latest .

2 - error: Step 10/23 : ADD serve serve ADD failed: stat /var/lib/docker/tmp/docker-builder531966407/serve: no such file or directory

any insights? I was in serve/docker when running if that matters (based on readme directions).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
harshbafnacommented, May 18, 2020

@lessw2020 : Looks like you missed out on the first step while following docker readme, where you need to clone the serve repo inside docker directory as well. The script takes care of this step.

1reaction
dhaniram-kshirsagarcommented, May 18, 2020

@lessw2020 As I have mentioned, we are working on it to fix docker doc via #266.

If you don’t want to build it from source then replace the following steps in Dockerfile.cpu/gpu:

ADD serve serve RUN pip install ../serve/

with

RUN pip install --no-cache-dir torchserve torch-model-archiver

your command docker build --file Dockerfile.cpu -t torchserve:latest .

And if you still want to build from source and want to use ‘docker build’ command then

cd serve/docker
git clone https://github.com/pytorch/serve.git
git checkout <master/any branch>
docker build --file Dockerfile.cpu -t torchserve:latest .

[you have already mentioned this 😃 ]

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker build Error: no such file or directory - Stack Overflow
To make the build work immediatly, your build command should be: docker build -f docker_python -t docker_python . By default, the build ......
Read more >
Overview of Docker Build - Docker Documentation
Docker Build is more than a simple build command, and it's not only about packaging your code. It's a whole ecosystem of tools...
Read more >
Docker: “build” Requires 1 Argument Error - Baeldung
The most common reason for “Docker build Requires 1 Argument” error is when we try to build the image without providing sufficient arguments....
Read more >
Use kaniko to build Docker images - GitLab Docs
kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. kaniko solves two problems with using...
Read more >
Building your Docker Image | Runnable Docker Guides
Detailed steps to build your Docker image and troubleshoot errors encountered ... no such file or directory, The file or directory provided as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found