Skip to content

unable to build #141

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

Closed
richardbedwell-imaginecurve opened this issue Nov 19, 2019 · 5 comments
Closed

unable to build #141

richardbedwell-imaginecurve opened this issue Nov 19, 2019 · 5 comments

Comments

@richardbedwell-imaginecurve

I am unable to build an image with the dockerfile in this repo (specifically i am using the cpu version).

running the command

docker build -t sagemaker-inference-images .

ends at:

Step 20/29 : COPY lib/changehostname.c / COPY failed: stat /var/lib/docker/tmp/docker-builder354479123/lib/changehostname.c: no such file or directory

@stale
Copy link

stale bot commented Nov 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 26, 2019
@saimidu
Copy link
Contributor

saimidu commented Dec 3, 2019

Hi @richardbedwell-imaginecurve,

Thank you for raising this issue. I believe the issue arises from the fact that the intended build context for dockerfiles in this repository is the base directory for the repo.

The base directory contains a directory named lib, with the changehostname.c file inside.

I believe running a command with the following template, once you have cloned the repository and entered its directory, should allow you to build successfully:

docker build -t <image_name>:<tag> -f docker/<PyTorch_version>/<Python_version>/Dockerfile.cpu .

For example, to build a CPU Py3 image for PyTorch 1.2.0 using the dockerfile at docker/1.2.0/py3/Dockerfile.cpu:

docker build -t preprod-pytorch:1.2.0-cpu-py3 -f docker/1.2.0/py3/Dockerfile.cpu  .

Could you please try this out and respond with the outcome?

@domino14
Copy link

domino14 commented Dec 6, 2019

Hi @saimidu, I'm not the OP but I tried to build the GPU version and it fails at step 36.

Step 36/40 : COPY dist/sagemaker_pytorch_container-1.2-py2.py3-none-any.whl /sagemaker_pytorch_container-1.2-py2.py3-none-any.whl
COPY failed: stat /var/lib/docker/tmp/docker-builder203823212/dist/sagemaker_pytorch_container-1.2-py2.py3-none-any.whl: no such file or directory

My build command was:

docker build -t pytorch-base:1.2.0-gpu-py3 -f docker/1.2.0/py3/Dockerfile.gpu .

@domino14
Copy link

domino14 commented Dec 6, 2019

I was able to build it by doing this:

cd sagemaker-pytorch-container
python setup.py bdist_wheel

@saimidu
Copy link
Contributor

saimidu commented Dec 9, 2019

Hi @domino14, Yes, that is the correct prerequisite step to be taken before the docker build is started. The build requires the sagemaker_pytorch_container-1.2-py2.py3-none-any.whl to be available in the dist/ directory in the build context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants