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

Update TorchServe dev container #2782

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

sachanub
Copy link
Collaborator

@sachanub sachanub commented Nov 9, 2023

Description

Please read our CONTRIBUTING.md prior to creating your first pull request.

Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)

The following changes have been made in this PR:

  • Moved the dev container stage to Dockerfile from Dockerfile.dev
  • While cloning the TorchServe repo in the Docker container, added the --recursive option to also pull the third party googleapis repository. If this is not done, running the regression tests inside the container will fail with this error:
0.377 google/rpc/status.proto: File not found.
0.377 inference.proto:6:1: Import "google/rpc/status.proto" was not found or had errors.
0.377 inference.proto:32:14: "google.rpc.Status" is not defined.
  • Update the build_image.sh script to build the dev container using Dockerfile instead of Dockerfile.dev.
  • Removed any codebuild and Dockerfile.benchmark related code from the build_image.sh script.
  • Updated the version of intel_extension_for_pytorch to 2.1.0.
  • Remove the section related to codebuild images from the README.md file.
  • Add a deprecation notice for Dockerfile.dev in the README.md file.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Feature/Issue validation/testing

Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

Tested the dev container by running the regression tests in it. Followed these steps to build and test the dev container:

./build_image.sh -g -bt dev
docker run -it --rm --gpus=all --user root pytorch/torchserve:dev-gpu /bin/bash
apt-get update 
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y wget nodejs npm zip unzip
npm install -g newman@5.3.2 newman-reporter-htmlextra markdown-link-check
cd /serve
python test/regression_tests.py

The logs of the test run can be found here regression_tests_logs.txt

Tested the dev IPEX container by running https://github.com/pytorch/serve/blob/master/test/pytest/test_example_intel_extension_for_pytorch.py in it. Followed these steps to build and test the dev IPEX container:

./build_image.sh -bt dev -ipex -t pytorch/torchserve:dev-ipex
docker run -it --rm --privileged --user root pytorch/torchserve:dev-ipex /bin/bash
mkdir -p /home/model-server/tmp/workspace/model_store
cd /home/model-server/tmp/workspace/model_store/
curl -O https://torchserve.pytorch.org/mar_files/resnet-18.mar
cd /serve/test/pytest
pytest -rA test_example_intel_extension_for_pytorch.py

The logs of the IPEX tests can be found here regression_test_ipex_logs.txt

@agunapal
Copy link
Collaborator

agunapal commented Nov 9, 2023

Hi @sachanub Thanks for refactoring this!
Can you please run the regression tests on the dev image and attach the logs. You can refer to the nightly docker regression workflow.

@agunapal agunapal self-requested a review November 9, 2023 21:30
@sachanub
Copy link
Collaborator Author

sachanub commented Nov 9, 2023

Hi @sachanub Thanks for refactoring this! Can you please run the regression tests on the dev image and attach the logs. You can refer to the nightly docker regression workflow.

Hi @agunapal. I just attached the regression test logs in the PR description. I have also included the testing steps. Thanks!

@agunapal
Copy link
Collaborator

agunapal commented Nov 9, 2023

Hi @sachanub Thanks for refactoring this! Can you please run the regression tests on the dev image and attach the logs. You can refer to the nightly docker regression workflow.

Hi @agunapal. I just attached the regression test logs in the PR description. I have also included the testing steps. Thanks!

Great!
Can you please enable/run this ipex test and see if it works. You can run just this single test in the container. Currently, its disabled for docker regression, but this should work in the dev image I suppose.
https://github.com/pytorch/serve/blob/master/test/pytest/test_example_intel_extension_for_pytorch.py

@sachanub
Copy link
Collaborator Author

sachanub commented Nov 9, 2023

Hi @sachanub Thanks for refactoring this! Can you please run the regression tests on the dev image and attach the logs. You can refer to the nightly docker regression workflow.

Hi @agunapal. I just attached the regression test logs in the PR description. I have also included the testing steps. Thanks!

Great! Can you please enable/run this ipex test and see if it works. You can run just this single test in the container. Currently, its disabled for docker regression, but this should work in the dev image I suppose. https://github.com/pytorch/serve/blob/master/test/pytest/test_example_intel_extension_for_pytorch.py

Sounds good. I will run the IPEX test and attach the logs.

@sachanub
Copy link
Collaborator Author

Hi @sachanub Thanks for refactoring this! Can you please run the regression tests on the dev image and attach the logs. You can refer to the nightly docker regression workflow.

Hi @agunapal. I just attached the regression test logs in the PR description. I have also included the testing steps. Thanks!

Great! Can you please enable/run this ipex test and see if it works. You can run just this single test in the container. Currently, its disabled for docker regression, but this should work in the dev image I suppose. https://github.com/pytorch/serve/blob/master/test/pytest/test_example_intel_extension_for_pytorch.py

Sounds good. I will run the IPEX test and attach the logs.

Attached logs of IPEX test run in PR description.

Copy link
Collaborator

@agunapal agunapal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sachanub ! LGTM

@agunapal agunapal added this pull request to the merge queue Nov 10, 2023
Merged via the queue into pytorch:master with commit 00609b0 Nov 10, 2023
13 checks passed
@sachanub sachanub deleted the dev_container branch November 10, 2023 17:19
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

Successfully merging this pull request may close these issues.

2 participants