From 99d9de585a5df4ef103eb0844b4eed0a5adef74e Mon Sep 17 00:00:00 2001 From: Tyler Titsworth Date: Tue, 13 Aug 2024 11:20:56 -0700 Subject: [PATCH 1/4] Add Perf Sample Example Section Signed-off-by: Tyler Titsworth --- python/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/python/README.md b/python/README.md index 0b9f95dc..78d4ebba 100644 --- a/python/README.md +++ b/python/README.md @@ -15,7 +15,7 @@ The images below include variations for only the core packages in the [Intel® D ## Build from Source -To build the images from source, clone the [Intel® AI Containers](https://github.com/intel/ai-containers) repository, follow the main `README.md` file to setup your environment, and run the following command: +To build the images from source, clone the [Intel® AI Containers](https://github.com/intel/ai-containers) repository, follow the main `README.md` file to setup your environment, and run the following commands: ```bash cd python @@ -30,6 +30,18 @@ You can find the list of services below for each container in the group: | `idp` | Base image with [Intel® Distribution for Python] | | `pip` | Equivalent python image without [Intel® Distribution for Python] | +## Run a Performance Sample + +To run a performance sample, clone the [Intel® AI Containers](https://github.com/intel/ai-containers) repository, follow the main `README.md` file to setup your environment, and run the following commands: + +```bash +cd python +docker run --rm -it \ + -v $PWD/tests:/tests \ + intel/python:latest \ + python /tests/perf_sample.py +``` + ## License View the [License](https://github.com/intel/ai-containers/blob/main/LICENSE) for the [Intel® Distribution for Python]. From d4e0f3dda4136559909322561ec8016a6e60e8ea Mon Sep 17 00:00:00 2001 From: Tyler Titsworth Date: Thu, 15 Aug 2024 09:20:03 -0700 Subject: [PATCH 2/4] Update README.md Signed-off-by: Tyler Titsworth --- python/README.md | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/python/README.md b/python/README.md index 78d4ebba..ce874854 100644 --- a/python/README.md +++ b/python/README.md @@ -2,8 +2,6 @@ [Intel® Distribution for Python] enhances performance and can improve your program speed from 10 to 100 times faster. It is a Python distribution that includes the [Intel® Math Kernel Library] (oneMKL) and other Intel performance libraries to enable near-native performance through acceleration of core numerical and machine learning packages. -[Intel® Distribution for Python] is available as part of the [Intel® oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html). - ## Images The images below include variations for only the core packages in the [Intel® Distribution for Python] installation, or all of the packages. @@ -13,7 +11,33 @@ The images below include variations for only the core packages in the [Intel® D | `3.10-full`, `latest` | `2024.2.0` | | `3.10-core` | `2024.2.0` | -## Build from Source +## Run a Performance Sample + +To run a performance sample run the following commands: + +```bash +git clone https://github.com/intel/ai-containers +cd ai-containers/python +docker run --rm -it \ + -v $PWD/tests:/tests \ + intel/python:latest \ + python /tests/perf_sample.py +``` + +### Compare the results against stock python + +In the previous command, you should see a result at the bottom like: `Time Consuming: 0.03897857666015625`. We can compare this against `python:3.11-slim-bullseye` + +```bash +docker run --rm -it \ + -v $PWD/tests:/tests \ + python:3.11-slim-bullseye \ + bash +pip install numpy +python /tests/perf_sample.py +``` + +## Build from Source (Advanced) To build the images from source, clone the [Intel® AI Containers](https://github.com/intel/ai-containers) repository, follow the main `README.md` file to setup your environment, and run the following commands: @@ -30,17 +54,6 @@ You can find the list of services below for each container in the group: | `idp` | Base image with [Intel® Distribution for Python] | | `pip` | Equivalent python image without [Intel® Distribution for Python] | -## Run a Performance Sample - -To run a performance sample, clone the [Intel® AI Containers](https://github.com/intel/ai-containers) repository, follow the main `README.md` file to setup your environment, and run the following commands: - -```bash -cd python -docker run --rm -it \ - -v $PWD/tests:/tests \ - intel/python:latest \ - python /tests/perf_sample.py -``` ## License From 0deb8eff65fbebbaa9c4c888471b6d8bd704aaf3 Mon Sep 17 00:00:00 2001 From: Tyler Titsworth Date: Fri, 16 Aug 2024 16:17:06 -0700 Subject: [PATCH 3/4] Update README.md Signed-off-by: Tyler Titsworth --- python/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/python/README.md b/python/README.md index ce874854..a857f638 100644 --- a/python/README.md +++ b/python/README.md @@ -1,10 +1,10 @@ -# Intel® Distribution for Python +# Intel® Distribution for Python* -[Intel® Distribution for Python] enhances performance and can improve your program speed from 10 to 100 times faster. It is a Python distribution that includes the [Intel® Math Kernel Library] (oneMKL) and other Intel performance libraries to enable near-native performance through acceleration of core numerical and machine learning packages. +[Intel® Distribution for Python*] enhances performance and can improve your program speed from 10 to 100 times faster. It is a Python* distribution that includes the [Intel® Math Kernel Library] (oneMKL) and other Intel performance libraries to enable near-native performance through acceleration of core numerical and machine learning packages. ## Images -The images below include variations for only the core packages in the [Intel® Distribution for Python] installation, or all of the packages. +The images below include variations for only the core packages in the [Intel® Distribution for Python*] installation, or all of the packages. | Tag(s) | IDP | | ---------------------- | ---------- | @@ -29,6 +29,7 @@ docker run --rm -it \ In the previous command, you should see a result at the bottom like: `Time Consuming: 0.03897857666015625`. We can compare this against `python:3.11-slim-bullseye` ```bash +# Use the working directory from the above command docker run --rm -it \ -v $PWD/tests:/tests \ python:3.11-slim-bullseye \ @@ -51,8 +52,8 @@ You can find the list of services below for each container in the group: | Service Name | Description | | ------------ | ------------------------------------------------------------------- | -| `idp` | Base image with [Intel® Distribution for Python] | -| `pip` | Equivalent python image without [Intel® Distribution for Python] | +| `idp` | Base image with [Intel® Distribution for Python*] | +| `pip` | Equivalent python image without [Intel® Distribution for Python*] | ## License @@ -65,5 +66,5 @@ It is the image user's responsibility to ensure that any use of The images below -[Intel® Distribution for Python]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m +[Intel® Distribution for Python*]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html#gs.9bos9m [Intel® Math Kernel Library]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html From f1d7cfab2fd5a612e1f6eac3f6ab413fdabf0ed4 Mon Sep 17 00:00:00 2001 From: Tyler Titsworth Date: Sat, 17 Aug 2024 22:08:27 -0700 Subject: [PATCH 4/4] Update README.md --- python/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/python/README.md b/python/README.md index a857f638..3b8d6d89 100644 --- a/python/README.md +++ b/python/README.md @@ -55,7 +55,6 @@ You can find the list of services below for each container in the group: | `idp` | Base image with [Intel® Distribution for Python*] | | `pip` | Equivalent python image without [Intel® Distribution for Python*] | - ## License View the [License](https://github.com/intel/ai-containers/blob/main/LICENSE) for the [Intel® Distribution for Python].