diff --git a/.github/workflows/chart-ci.yaml b/.github/workflows/chart-ci.yaml index 24b5404ea..916423b23 100644 --- a/.github/workflows/chart-ci.yaml +++ b/.github/workflows/chart-ci.yaml @@ -26,7 +26,7 @@ jobs: runs-on: kubectl steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/container-ci.yaml b/.github/workflows/container-ci.yaml index 08669ffa6..20213f5b6 100644 --- a/.github/workflows/container-ci.yaml +++ b/.github/workflows/container-ci.yaml @@ -63,10 +63,10 @@ jobs: setup-build: outputs: matrix: ${{ steps.build-matrix.outputs.matrix }} - runs-on: ubuntu-latest # ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -79,13 +79,14 @@ jobs: build-containers: needs: [setup-build] env: ${{ matrix }} - runs-on: ubuntu-latest # ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} strategy: matrix: ${{ fromJson(needs.setup-build.outputs.matrix) }} fail-fast: false outputs: group: ${{ steps.build-group.outputs.container-group }} steps: + - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 if: ${{ !inputs.no_build }} - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 @@ -111,12 +112,12 @@ jobs: setup-scan: needs: [build-containers] if: ${{ github.event_name == 'pull_request' }} - runs-on: ubuntu-latest # ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} outputs: matrix: ${{ steps.scan-matrix.outputs.matrix }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 @@ -135,7 +136,7 @@ jobs: fail-fast: false steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -154,7 +155,7 @@ jobs: - name: Cleanup if: always() run: docker rmi -f ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }} - - uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + - uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 with: sarif_file: '${{ matrix.container }}-scan.sarif' category: '${{ matrix.container }}' @@ -164,12 +165,12 @@ jobs: #################################################################################################### setup-test: needs: [build-containers] - runs-on: ubuntu-latest # ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} outputs: matrix: ${{ steps.test-matrix.outputs.matrix }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -186,7 +187,7 @@ jobs: experimental: [true] fail-fast: false steps: - - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + - uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index 9feca4233..cce8357f1 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -34,7 +34,7 @@ jobs: pull-requests: write steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml index f3bbd9bf7..201e8888f 100644 --- a/.github/workflows/dockerhub-description.yml +++ b/.github/workflows/dockerhub-description.yml @@ -24,7 +24,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -39,7 +39,7 @@ jobs: fail-fast: false steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 900afb5f8..0b8742c64 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -32,7 +32,7 @@ jobs: pages: write steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index af6f4cc27..2a112c5bb 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -26,7 +26,7 @@ jobs: groups: ${{ steps.group-list.outputs.FOLDERS }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -113,12 +113,12 @@ jobs: path: output.txt recreate: true status-check: - needs: [group-diff, pipeline-ci] + needs: [group-diff, pipeline-ci, merge-logs] runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} if: always() steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - run: exit 1 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0d170a628..2e5506896 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -31,7 +31,7 @@ jobs: statuses: write steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 72abc0f8c..086103d85 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -36,7 +36,7 @@ jobs: actions: read steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -48,11 +48,11 @@ jobs: results_format: sarif repo_token: ${{ secrets.GITHUB_TOKEN }} publish_results: true - - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: SARIF file path: results.sarif retention-days: 5 - - uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + - uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 with: sarif_file: results.sarif diff --git a/.github/workflows/security-report.yaml b/.github/workflows/security-report.yaml index f1ccde654..a9d3b98bf 100644 --- a/.github/workflows/security-report.yaml +++ b/.github/workflows/security-report.yaml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: rsdmike/github-security-report-action@a149b24539044c92786ec39af8ba38c93496495d # v3.0.4 @@ -35,7 +35,7 @@ jobs: sarifReportDir: ${{ github.workspace }} template: report token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: Security Report Summary path: ./*.pdf diff --git a/.github/workflows/test-runner-ci.yaml b/.github/workflows/test-runner-ci.yaml index 6ef0e6173..448e09705 100644 --- a/.github/workflows/test-runner-ci.yaml +++ b/.github/workflows/test-runner-ci.yaml @@ -33,7 +33,7 @@ jobs: fail-fast: true steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -66,7 +66,7 @@ jobs: runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0 @@ -76,7 +76,7 @@ jobs: runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/weekly-test.yaml b/.github/workflows/weekly-test.yaml index 41c8a1df4..41189eede 100644 --- a/.github/workflows/weekly-test.yaml +++ b/.github/workflows/weekly-test.yaml @@ -25,7 +25,7 @@ jobs: groups: ${{ steps.group-list.outputs.FOLDERS }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -56,7 +56,7 @@ jobs: runs-on: kubectl steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -72,7 +72,7 @@ jobs: runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} steps: - name: Harden Runner - uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 with: egress-policy: audit - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/classical-ml/README.md b/classical-ml/README.md index 06cfa613c..9d63355c4 100644 --- a/classical-ml/README.md +++ b/classical-ml/README.md @@ -10,7 +10,8 @@ The images below include [Intel® Extension for Scikit-learn*] and [XGBoost*]. | Tag(s) | Intel SKLearn | Scikit-learn | XGBoost | Dockerfile | | ------------------------------------------------- | -------------- | ------------ | -------- | --------------- | -| `2024.5.0-pip-base`, `latest` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | +| `2024.6.0-pip-base`, `latest` | [v2024.6.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | +| `2024.5.0-pip-base` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | | `2024.3.0-pip-base` | [v2024.3.0] | [v1.4.2] | [v2.0.3] | [v0.4.0-Beta] | | `2024.2.0-xgboost-2.0.3-pip-base` | [v2024.2.0] | [v1.4.1] | [v2.0.3] | [v0.4.0-Beta] | | `scikit-learning-2024.0.0-xgboost-2.0.2-pip-base` | [v2024.0.0] | [v1.3.2] | [v2.0.2] | [v0.3.4] | @@ -19,6 +20,7 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | Intel SKLearn | Scikit-learn | XGBoost | Dockerfile | | ---------------------------------------------------- | -------------- | ------------ | -------- | --------------- | +| `2024.6.0-pip-jupyter` | [v2024.6.0] | [v1.5.1] | [v2.1.1] | [v0.4.0] | | `2024.5.0-pip-jupyter` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | | `2024.3.0-pip-jupyter` | [v2024.3.0] | [v1.4.2] | [v2.0.3] | [v0.4.0-Beta] | | `2024.2.0-xgboost-2.0.3-pip-jupyter` | [v2024.2.0] | [v1.4.1] | [v2.0.3] | [v0.4.0-Beta] | @@ -43,7 +45,9 @@ The images below include [Intel® Distribution for Python*]: | Tag(s) | Intel SKLearn | Scikit-learn | XGBoost | Dockerfile | | ------------------------------------------------- | -------------- | ------------ | -------- | --------------- | -| `2024.3.0-idp-base` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | +| `2024.6.0-idp-base` | [v2024.6.0] | [v1.5.1] | [v2.1.1] | [v0.4.0] | +| `2024.5.0-idp-base` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | +| `2024.3.0-idp-base` | [v2024.3.0] | [v1.4.1] | [v2.1.0] | [v0.4.0] | | `2024.2.0-xgboost-2.0.3-idp-base` | [v2024.2.0] | [v1.4.1] | [v2.0.3] | [v0.4.0-Beta] | | `scikit-learning-2024.0.0-xgboost-2.0.2-idp-base` | [v2024.0.0] | [v1.3.2] | [v2.0.2] | [v0.3.4] | @@ -51,7 +55,9 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | Intel SKLearn | Scikit-learn | XGBoost | Dockerfile | | ---------------------------------------------------- | -------------- | ------------ | -------- | --------------- | -| `2024.3.0-idp-jupyter` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | +| `2024.6.0-idp-jupyter` | [v2024.6.0] | [v1.5.1] | [v2.1.1] | [v0.4.0] | +| `2024.5.0-idp-jupyter` | [v2024.5.0] | [v1.5.0] | [v2.1.0] | [v0.4.0] | +| `2024.3.0-idp-jupyter` | [v2024.3.0] | [v1.4.0] | [v2.1.0] | [v0.4.0] | | `2024.2.0-xgboost-2.0.3-idp-jupyter` | [v2024.2.0] | [v1.4.1] | [v2.0.3] | [v0.4.0-Beta] | | `scikit-learning-2024.0.0-xgboost-2.0.2-idp-jupyter` | [v2024.0.0] | [v1.3.2] | [v2.0.2] | [v0.3.4] | @@ -89,16 +95,19 @@ It is the image user's responsibility to ensure that any use of The images below [Scikit-learn*]: https://scikit-learn.org/stable/ [XGBoost*]: https://github.com/dmlc/xgboost +[v2024.6.0]: https://github.com/intel/scikit-learn-intelex/releases/tag/2024.6.0 [v2024.5.0]: https://github.com/intel/scikit-learn-intelex/releases/tag/2024.5.0 [v2024.3.0]: https://github.com/intel/scikit-learn-intelex/releases/tag/2024.3.0 [v2024.2.0]: https://github.com/intel/scikit-learn-intelex/releases/tag/2024.2.0 [v2024.0.0]: https://github.com/intel/scikit-learn-intelex/releases/tag/2024.0.0 +[v1.5.1]: https://github.com/scikit-learn/scikit-learn/releases/tag/1.5.1 [v1.5.0]: https://github.com/scikit-learn/scikit-learn/releases/tag/1.5.0 [v1.4.2]: https://github.com/scikit-learn/scikit-learn/releases/tag/1.4.2 [v1.4.1]: https://github.com/scikit-learn/scikit-learn/releases/tag/1.4.1 [v1.3.2]: https://github.com/scikit-learn/scikit-learn/releases/tag/1.3.2 +[v2.1.1]: https://github.com/dmlc/xgboost/releases/tag/v2.1.1 [v2.1.0]: https://github.com/dmlc/xgboost/releases/tag/v2.1.0 [v2.0.3]: https://github.com/dmlc/xgboost/releases/tag/v2.0.3 [v2.0.2]: https://github.com/dmlc/xgboost/releases/tag/v2.0.2 diff --git a/classical-ml/docker-compose.yaml b/classical-ml/docker-compose.yaml index 0a775bdc8..491005def 100644 --- a/classical-ml/docker-compose.yaml +++ b/classical-ml/docker-compose.yaml @@ -40,21 +40,21 @@ services: org.opencontainers.base.name: "intel/python:3.10-core" org.opencontainers.image.name: "intel/intel-optimized-ml" org.opencontainers.image.title: "Intel® Optimized ML Base Image" - org.opencontainers.image.version: ${SKLEARN_VERSION:-2024.4.0}-${PACKAGE_OPTION:-pip}-base + org.opencontainers.image.version: ${SKLEARN_VERSION:-2024.6.0}-${PACKAGE_OPTION:-pip}-base target: ml-base-${PACKAGE_OPTION:-pip} command: > bash -c "python -c 'import sklearnex, sklearn; import xgboost as xgb; print(\"Scikit version:\", sklearn.__version__, \"\\nXGBoost version:\", xgb.__version__)'" depends_on: - ${PACKAGE_OPTION:-pip} - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SCIKIT_VERSION:-2024.5.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-base + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SKLEARN_VERSION:-2024.6.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-base pull_policy: always jupyter: build: labels: dependency.python.pip: jupyter-requirements.txt - org.opencontainers.base.name: "intel/intel-optimized-ml:${SKLEARN_VERSION:-2024.4.0}-${PACKAGE_OPTION:-pip}-base" + org.opencontainers.base.name: "intel/intel-optimized-ml:${SKLEARN_VERSION:-2024.6.0}-${PACKAGE_OPTION:-pip}-base" org.opencontainers.image.title: "Intel® Optimized ML Jupyter Base Image" - org.opencontainers.image.version: ${SKLEARN_VERSION:-2024.4.0}-${PACKAGE_OPTION:-pip}-jupyter + org.opencontainers.image.version: ${SKLEARN_VERSION:-2024.6.0}-${PACKAGE_OPTION:-pip}-jupyter target: jupyter command: > bash -c "python -m jupyter --version" @@ -62,5 +62,5 @@ services: http_proxy: ${http_proxy} https_proxy: ${https_proxy} extends: ml-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SCIKIT_VERSION:-2024.5.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-jupyter + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SKLEARN_VERSION:-2024.6.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-jupyter network_mode: host diff --git a/classical-ml/tests/tests.yaml b/classical-ml/tests/tests.yaml index 0016987be..197dd285d 100644 --- a/classical-ml/tests/tests.yaml +++ b/classical-ml/tests/tests.yaml @@ -14,13 +14,13 @@ --- classical-ml-import-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SCIKIT_VERSION:-2024.5.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SKLEARN_VERSION:-2024.6.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-base cmd: python -c "from sklearnex import patch_sklearn; patch_sklearn();import xgboost as xgb; print(xgb.__version__)" classical-ml-import-${PACKAGE_OPTION:-pip}-jupyter: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SCIKIT_VERSION:-2024.5.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-jupyter + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SKLEARN_VERSION:-2024.6.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-jupyter cmd: sh -c "python -m jupyter --version" classical-ml-performance-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SCIKIT_VERSION:-2024.5.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-scikit-learn-${SKLEARN_VERSION:-2024.6.0}-xgboost-${XGBOOST_VERSION:-2.1.0}-base cmd: python /tests/performance.py volumes: - src: $PWD/classical-ml/tests diff --git a/preset/classical-ml/Dockerfile b/preset/classical-ml/Dockerfile index a9666e3af..bd6cebdee 100644 --- a/preset/classical-ml/Dockerfile +++ b/preset/classical-ml/Dockerfile @@ -12,40 +12,35 @@ # See the License for the specific language governing permissions and # limitations under the License. + ARG BASE_IMAGE="ubuntu" ARG BASE_TAG="22.04" -FROM ${BASE_IMAGE}:${BASE_TAG} as classical-ml-base +FROM ${BASE_IMAGE}:${BASE_TAG} as classical-ml ENV DEBIAN_FRONTEND=noninteractive -# See http://bugs.python.org/issue19846 - ENV LANG=C.UTF-8 SHELL ["/bin/bash", "-c"] RUN apt-get update -y && \ apt-get install -y --no-install-recommends --fix-missing \ - bzip2 \ - ca-certificates \ - diffutils \ - gcc \ - git \ - gzip \ - make \ - patch \ - rsync \ - unzip \ - wget \ - xz-utils && \ + bzip2 \ + ca-certificates \ + diffutils \ + gcc \ + git \ + gzip \ + make \ + patch \ + rsync \ + unzip \ + wget \ + xz-utils && \ rm -rf /var/lib/apt/lists/* -FROM classical-ml-base as classical-ml-python - -# Setting up non-root directories RUN useradd --uid 1000 -d /home/dev -s /bin/bash -m dev -# Set a password for the user (Optional) RUN echo 'dev:password' | chpasswd USER dev WORKDIR /home/dev @@ -56,68 +51,69 @@ ARG PYTHON_VERSION ARG IDP_VERSION ARG INTEL_CHANNEL -RUN wget --progress=dot:giga --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-${MINIFORGE_VERSION}.sh -O miniforge.sh && \ +RUN wget --progress=dot:giga --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/${MINIFORGE_VERSION}.sh -O miniforge.sh && \ chmod +x miniforge.sh && \ ./miniforge.sh -b -p "${CONDA_ROOT}" && \ rm ./miniforge.sh && \ - ln -s "${CONDA_ROOT}" "${CONDA_ROOT}/../miniforge3" && \ + ln -s "${CONDA_ROOT}" "${CONDA_ROOT}/../miniforge" && \ export PATH="${CONDA_ROOT}/bin/:${PATH}" && \ - conda update -y conda && \ - conda config --add channels conda-forge && \ - conda config --add channels https://software.repos.intel.com/python/conda/ && \ conda init --all && \ conda install -y \ - 'jupyterlab>=4.1.8' \ - 'notebook>=7.1.3' \ - 'jupyterhub>=4.1.5' \ - 'jupyter-server-proxy>=4.1.2' \ - 'mako>=1.2.2' \ - 'pyjwt>=2.4.0' \ - 'cryptography>=42.0.5' \ - 'nodejs>=20.12.2' \ - 'aiohttp>=3.9.4' \ + 'colorama==0.4.6' \ + 'conda==24.5.0' \ + 'jupyterhub==5.1.0' \ + 'jupyter-server-proxy==4.3.0' \ + 'mamba==1.5.8' \ + 'networkx==3.3' \ + 'notebook==7.2.1' \ + 'pip==24.0' \ + 'python==3.10.14' \ 'idna>=3.7' \ - 'oauthlib>=3.2.2' \ - && \ - jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ - conda clean -y --all + 'requests>=2.32.0' \ + 'setuptools>=70.0.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + 'nodejs==22.5.1' \ + && \ + jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \ + && \ + conda clean -y --all \ + && \ + conda config --add channels ${INTEL_CHANNEL} ENV PATH ${CONDA_ROOT}/condabin:${CONDA_ROOT}/bin/:${PATH} +RUN conda config --set pip_interop_enabled True ARG IDP_VERSION +ARG DAAL4PY_VERSION ARG DPNP_VERSION ARG XGBOOST_VERSION ARG MODIN_VERSION ARG NUMPY_VERSION ARG SKLEARNEX_VERSION -# Conda packages -RUN conda create -yn classical-ml -c ${INTEL_CHANNEL} -c conda-forge \ - dpnp=${DPNP_VERSION} \ - numpy=${NUMPY_VERSION} \ - python=${PYTHON_VERSION} \ - scikit-learn-intelex==${SKLEARNEX_VERSION} \ - xgboost=${XGBOOST_VERSION} \ - modin-ray=${MODIN_VERSION} \ - 'python-dotenv>=1.0.1' \ - 'tqdm>=4.66.2' \ - 'matplotlib-base>=3.4.3' \ - 'threadpoolctl>=3.3.0' \ - 'ipython>=8.18.1' \ - 'ipykernel>=6.29.3' \ - 'kernda>=0.3.0' \ - 'protobuf>=4.24' \ - 'pillow>=10.2.0' \ - 'tornado>=6.3.3' && \ +RUN conda create -yn classical-ml \ + "python=${PYTHON_VERSION}" \ + "daal4py=${DAAL4PY_VERSION}" \ + "dpnp=${DPNP_VERSION}" \ + 'ipykernel==6.29.5' \ + 'kernda==0.3.0' \ + 'matplotlib-base==3.8.4' \ + "modin-ray=${MODIN_VERSION}" \ + 'python-dotenv==1.0.1' \ + "scikit-learn-intelex=${SKLEARNEX_VERSION}" \ + 'tqdm==4.66.4' \ + "xgboost=${XGBOOST_VERSION}" \ + 'idna>=3.7' \ + 'requests>=2.32.0' \ + 'setuptools>=70.0.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + && \ conda clean -y --all - - -# PyPI packages RUN conda run -n classical-ml python -m pip install --no-deps --no-cache-dir \ - 'dataset-librarian==1.0.4' \ - 'cloud-data-connector==1.0.3' - + 'dataset-librarian==1.0.4' ENV PYTHONSTARTUP=~/.patch_sklearn.py COPY base/.patch_sklearn.py ~/.patch_sklearn.py @@ -125,8 +121,6 @@ COPY base/.patch_sklearn.py ~/.patch_sklearn.py ENV PYTHONSTARTUP=/home/dev/.patch_sklearn.py COPY base/.patch_sklearn.py /home/dev/.patch_sklearn.py -FROM classical-ml-python as classical-ml-jupyter - EXPOSE 8888 RUN mkdir -p ~/jupyter/ && chmod -R a+rwx ~/jupyter/ && \ @@ -136,10 +130,10 @@ WORKDIR /home/dev COPY --chown=dev notebooks /home/dev/jupyter COPY --chown=dev tests /home/dev/sample-tests -RUN "${CONDA_ROOT}/envs/classical-ml/bin/python" -m ipykernel install --user --name classical-ml --display-name "Classical ML" && \ - "${CONDA_ROOT}/envs/classical-ml/bin/kernda" -o -y "$HOME/.local/share/jupyter/kernels/$(echo classical-ml | sed -e 's/\(.*\)/\L\1/')/kernel.json" && \ - "${CONDA_ROOT}/envs/classical-ml/bin/python" -m ipykernel.kernelspec --user && \ - conda clean -y --all +RUN KERNEL_DIR="${CONDA_ROOT}/share/jupyter/kernels/classical-ml" && \ + conda run -n classical-ml python -m ipykernel install --prefix "$CONDA_ROOT" --name classical-ml --display-name "Classical ML" && \ + conda run -n classical-ml kernda -o -y "$KERNEL_DIR/kernel.json" && \ + conda run -n base jupyter kernelspec list CMD ["bash", "-c", "source activate classical-ml && jupyter lab --notebook-dir=~/jupyter --port 8888 --ip 0.0.0.0 --no-browser --allow-root"] diff --git a/preset/classical-ml/docker-compose.yaml b/preset/classical-ml/docker-compose.yaml index a6e06fbdc..c2dc9c1a9 100644 --- a/preset/classical-ml/docker-compose.yaml +++ b/preset/classical-ml/docker-compose.yaml @@ -15,6 +15,7 @@ # -*- coding: utf-8 -*- # + version: '3' services: classical-ml: @@ -22,28 +23,30 @@ services: args: BASE_IMAGE: ${BASE_IMAGE:-ubuntu} BASE_TAG: ${BASE_TAG:-22.04} - DPNP_VERSION: ${NUMBA_DPEX_VERSION:-0.14.0} - IDP_VERSION: ${IDP_VERSION:-2024.1.0} + DAAL4PY_VERSION: ${DAAL4PY_VERSION:-2024.5.0} + DPNP_VERSION: ${DPNP_VERSION:-0.15.0} + IDP_VERSION: ${IDP_VERSION:-2024.2} INTEL_CHANNEL: ${INTEL_CHANNEL:-https://software.repos.intel.com/python/conda/} - MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Linux-x86_64} - MODIN_VERSION: ${MODIN_VERSION:-0.26.1} - MPI_VERSION: ${MPI_VERSION:-2021.12.0} - NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.22.1} + MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Miniforge3-Linux-x86_64} + MODIN_VERSION: ${MODIN_VERSION:-0.30.0} + MPI_VERSION: ${MPI_VERSION:-2021.13} + NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.23.0} NUMPY_VERSION: ${NUMPY_VERSION:-1.26.4} - PYTHON_VERSION: ${PYTHON_VERSION:-3.10} - SKLEARNEX_VERSION: ${SKLEARNEX_VERSION:-2024.2.0} + PYTHON_VERSION: ${PYTHON_VERSION:-3.9} + SKLEARNEX_VERSION: ${SKLEARNEX_VERSION:-2024.5.0} XGBOOST_VERSION: ${XGBOOST_VERSION:-2.0.3} http_proxy: ${http_proxy} https_proxy: ${https_proxy} no_proxy: '' context: . + target: classical-ml labels: docs: classical_ml org.opencontainers.image.title: "Intel® AI Tools Selector Preset Containers - Classical ML" org.opencontainers.base.name: "ubuntu:22.04" org.opencontainers.image.name: "intel/classical-ml" - org.opencontainers.image.version: 2024.1.0-py${PYTHON_VERSION:-3.10} - dependency.python: ${PYTHON_VERSION:-3.10} + org.opencontainers.image.version: 2024.2.0-py${PYTHON_VERSION:-3.9} + dependency.python: ${PYTHON_VERSION:-3.9} dependency.python.pip: requirements.txt dependency.apt.bzip2: true dependency.apt.ca-certificates: true @@ -57,39 +60,26 @@ services: dependency.apt.unzip: true dependency.apt.wget: true dependency.apt.xz-utils: true - dependency.conda.jupyterlab: '>=4.1.8' - dependency.conda.notebook: '>=7.1.3' - dependency.conda.jupyterhub: '>=4.1.5' - dependency.conda.jupyter-server-proxy: '>=4.1.2' - dependency.conda.mako: '>=1.2.2' - dependency.conda.pyjwt: '>=2.4.0' - dependency.conda.cryptography: '>=42.0.5' - dependency.conda.nodejs: '>=20.12.2' - dependency.conda.aiohttp: '>=3.9.4' - dependency.conda.idna: '>=3.7' - dependency.conda.oauthlib: '>=3.2.2' - dependency.conda.dpnp: '>=0.14.0' - dependency.conda.numpy: '>=1.26.4' - dependency.conda.python: "=${PYTHON_VERSION:-3.10}" - dependency.conda.scikit-learn-intelex: '>=2024.2.0' - dependency.conda.xgboost: '>=2.0.3' - dependency.conda.modin-ray: '>=0.26.1' - dependency.conda.python-dotenv: '>=1.0.1' - dependency.conda.tqdm: '>=4.66.2' - dependency.conda.matplotlib-base: '>=3.4.3' - dependency.conda.dataset_librarian: '>=1.0.4' - dependency.conda.threadpoolctl: '>=3.3.0' - dependency.conda.ipython: '>=8.18.1' - dependency.conda.ipykernel: '>=6.29.3' - dependency.conda.kernda: '>=0.3.0' - dependency.conda.protobuf: '>=4.24' - dependency.conda.pillow: '>=10.2.0' - dependency.conda.tornado: '>=6.3.3' - target: classical-ml-jupyter - command: | - bash -c "conda run -n classical-ml python -c 'import sklearn; import xgboost; print(\"SciKit:\", sklearn.__version__, \" XGBoost:\",xgboost.__version__)' && \ - conda run -n classical-ml python -c 'import modin.pandas as pd, modin.config as cfg; cfg.Engine.put(\"Ray\"); df = pd.DataFrame([1]);print(df+1)'" - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-classical-ml-2024.1.0-py${PYTHON_VERSION:-3.10} + dependency.conda.colorama: '==0.4.6' + dependency.conda.conda: '==24.5.0' + dependency.conda.daal4py: '=2024.5.0' + dependency.conda.dpnp: '=0.15.0' + dependency.conda.ipykernel: '==6.29.5' + dependency.conda.jupyterhub: '==5.1.0' + dependency.conda.jupyter-server-proxy: '==4.3.0' + dependency.conda.kernda: '==0.3.0' + dependency.conda.mamba: '==1.5.8' + dependency.conda.matplotlib-base: '==3.8.4' + dependency.conda.modin-ray: '=0.30.0' + dependency.conda.networkx: '==3.3' + dependency.conda.notebook: '==7.2.1' + dependency.conda.pip: '==24.0' + dependency.conda.python: '==3.10.14' + dependency.conda.python-dotenv: '==1.0.1' + dependency.conda.scikit-learn-intelex: '=2024.5.0' + dependency.conda.tqdm: '==4.66.4' + dependency.conda.xgboost: '=2.0.3' + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-classical-ml-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} environment: http_proxy: ${http_proxy} https_proxy: ${https_proxy} @@ -97,3 +87,9 @@ services: shm_size: 12GB volumes: - /dev/dri/by-path:/dev/dri/by-path + command: > + bash -c " conda run -n classical-ml python -c 'import sklearn;import xgboost;print(\"SciKit:\", + sklearn.__version__, \" XGBoost:\", xgboost.__version__)' && + + conda run -n classical-ml python -c 'import modin.pandas as pd;import modin.config + as cfg;cfg.Engine.put(\"Ray\");df = pd.DataFrame([1]);print(df+1)' " diff --git a/preset/classical-ml/requirements.txt b/preset/classical-ml/requirements.txt index d231202db..8fe3dfff8 100644 --- a/preset/classical-ml/requirements.txt +++ b/preset/classical-ml/requirements.txt @@ -1 +1 @@ -cloud-data-connector==1.0.3 +dataset-librarian==1.0.4 diff --git a/preset/classical-ml/tests/scikit/kmeans.py b/preset/classical-ml/tests/scikit/kmeans.py index 9120b7d01..c78acba71 100644 --- a/preset/classical-ml/tests/scikit/kmeans.py +++ b/preset/classical-ml/tests/scikit/kmeans.py @@ -62,6 +62,7 @@ data, labels = load_digits(return_X_y=True) (n_samples, n_features), n_digits = data.shape, np.unique(labels).size +data = np.array(data, dtype=np.float64) print(f"# digits: {n_digits}; # samples: {n_samples}; # features {n_features}") diff --git a/preset/classical-ml/tests/scikit/test_scikit.sh b/preset/classical-ml/tests/scikit/test_scikit.sh index a6b2f24ed..9d16e9386 100755 --- a/preset/classical-ml/tests/scikit/test_scikit.sh +++ b/preset/classical-ml/tests/scikit/test_scikit.sh @@ -14,8 +14,8 @@ # limitations under the License. set -xe + SCRIPT_DIR=$(dirname "$0") python "${SCRIPT_DIR}/kmeans.py" - -python "${SCRIPT_DIR}/kmeans.py" true +python "${SCRIPT_DIR}/kmeans.py" true # Enable intel opt diff --git a/preset/data-analytics/Dockerfile b/preset/data-analytics/Dockerfile index 37954c835..ffb56ceb6 100644 --- a/preset/data-analytics/Dockerfile +++ b/preset/data-analytics/Dockerfile @@ -12,107 +12,100 @@ # See the License for the specific language governing permissions and # limitations under the License. + ARG BASE_IMAGE="ubuntu" ARG BASE_TAG="22.04" -FROM ${BASE_IMAGE}:${BASE_TAG} as data-analytics-base +FROM ${BASE_IMAGE}:${BASE_TAG} as data-analytics ENV DEBIAN_FRONTEND=noninteractive -# See http://bugs.python.org/issue19846 - ENV LANG=C.UTF-8 SHELL ["/bin/bash", "-c"] RUN apt-get update -y && \ apt-get install -y --no-install-recommends --fix-missing \ - bzip2 \ - ca-certificates \ - diffutils \ - gcc \ - git \ - gzip \ - make \ - patch \ - rsync \ - unzip \ - wget \ - xz-utils && \ + bzip2 \ + ca-certificates \ + diffutils \ + gcc \ + git \ + gzip \ + make \ + patch \ + rsync \ + unzip \ + wget \ + xz-utils && \ rm -rf /var/lib/apt/lists/* -FROM data-analytics-base as data-analytics-python - -# Setting up non-root directories RUN useradd --uid 1000 -d /home/dev -s /bin/bash -m dev -# Set a password for the user (Optional) RUN echo 'dev:password' | chpasswd USER dev WORKDIR /home/dev ENV CONDA_ROOT=/home/dev/conda - ARG MINIFORGE_VERSION ARG PYTHON_VERSION ARG IDP_VERSION ARG INTEL_CHANNEL -RUN wget --progress=dot:giga --no-check-certificate "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-${MINIFORGE_VERSION}.sh" -O miniforge.sh && \ +RUN wget --progress=dot:giga --no-check-certificate "https://github.com/conda-forge/miniforge/releases/latest/download/${MINIFORGE_VERSION}.sh" -O miniforge.sh && \ chmod +x miniforge.sh && \ ./miniforge.sh -b -p "${CONDA_ROOT}" && \ rm ./miniforge.sh && \ - ln -s "${CONDA_ROOT}" "${CONDA_ROOT}/../miniforge3" && \ + ln -s "${CONDA_ROOT}" "${CONDA_ROOT}/../miniforge" && \ export PATH="${CONDA_ROOT}/bin/:${PATH}" && \ - conda update -y conda && \ - conda config --add channels conda-forge && \ - conda config --add channels https://software.repos.intel.com/python/conda/ && \ conda init --all && \ conda install -y \ - 'jupyterlab>=4.1.8' \ - 'notebook>=7.1.3' \ - 'jupyterhub>=4.1.5' \ - 'jupyter-server-proxy>=4.1.2' \ - 'mako>=1.2.2' \ - 'pyjwt>=2.4.0' \ - 'cryptography>=42.0.5' \ - 'nodejs>=20.12.2' \ + 'colorama==0.4.6' \ + 'conda==24.5.0' \ + 'jupyterhub==5.1.0' \ + 'jupyter-server-proxy==4.3.0' \ + 'mamba==1.5.8' \ + 'networkx==3.3' \ + 'notebook==7.2.1' \ + 'python==3.10.14' \ 'idna>=3.7' \ - 'tqdm>=4.66.2' \ - && \ - jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ - conda clean -y --all + 'requests>=2.32.0' \ + 'setuptools>=70.0.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + 'nodejs==22.5.1' \ + && \ + jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \ + && \ + conda clean -y --all \ + && \ + conda config --add channels ${INTEL_CHANNEL} ENV PATH ${CONDA_ROOT}/condabin:${CONDA_ROOT}/bin/:${PATH} +RUN conda config --set pip_interop_enabled True ARG IDP_VERSION ARG DPNP_VERSION ARG MODIN_VERSION ARG NUMPY_VERSION -# data-analytics Env - conda packages -RUN conda create -yn data-analytics -c "${INTEL_CHANNEL}" -c conda-forge \ - dpnp="${DPNP_VERSION}" \ - numpy="${NUMPY_VERSION}" \ - python="${PYTHON_VERSION}" \ - modin-ray="${MODIN_VERSION}" \ - 'python-dotenv>=1.0.1' \ - 'tqdm>=4.66.2' \ - 'matplotlib-base>=3.4.3' \ - 'threadpoolctl>=3.3.0' \ - 'ipython>=8.18.1' \ - 'ipykernel>=6.29.3' \ - 'kernda>=0.3.0' \ - 'protobuf>=4.24.4' \ - 'pillow>=10.2.0' \ +RUN conda create -yn data-analytics \ + "python=${PYTHON_VERSION}" \ + "dpnp=${DPNP_VERSION}" \ + 'ipykernel==6.29.5' \ + 'kernda==0.3.0' \ + 'matplotlib-base==3.8.4' \ + "modin-ray=${MODIN_VERSION}" \ + 'python-dotenv==1.0.1' \ 'idna>=3.7' \ - 'tornado>=6.3.3' && \ + 'requests>=2.32.0' \ + 'setuptools>=70.0.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + && \ conda clean -y --all RUN conda run -n data-analytics python -m pip install --no-deps --no-cache-dir \ - 'dataset-librarian==1.0.4' \ - 'cloud-data-connector==1.0.3' - -FROM data-analytics-python as data-analytics-jupyter + 'dataset-librarian==1.0.4' EXPOSE 8888 @@ -122,10 +115,10 @@ RUN mkdir -p ~/jupyter/ && chmod -R a+rwx ~/jupyter/ && \ COPY --chown=dev notebooks /home/dev/jupyter COPY --chown=dev tests /home/dev/sample-tests -RUN "${CONDA_ROOT}/envs/data-analytics/bin/python" -m ipykernel install --user --name data-analytics --display-name "Data Analytics" && \ - "${CONDA_ROOT}/envs/data-analytics/bin/kernda" -o -y "$HOME/.local/share/jupyter/kernels/$(echo data-analytics | sed -e 's/\(.*\)/\L\1/')/kernel.json" && \ - "${CONDA_ROOT}/envs/data-analytics/bin/python" -m ipykernel.kernelspec --user && \ - conda clean -y --all +RUN KERNEL_DIR="${CONDA_ROOT}/share/jupyter/kernels/data-analytics" && \ + conda run -n data-analytics python -m ipykernel install --prefix "$CONDA_ROOT" --name data-analytics --display-name "Data Analytics" && \ + conda run -n data-analytics kernda -o -y "$KERNEL_DIR/kernel.json" && \ + conda run -n base jupyter kernelspec list CMD ["bash", "-c", "source activate data-analytics && jupyter lab --notebook-dir=~/jupyter --port 8888 --ip 0.0.0.0 --no-browser --allow-root"] diff --git a/preset/data-analytics/docker-compose.yaml b/preset/data-analytics/docker-compose.yaml index 99b37f6de..9c00331ef 100644 --- a/preset/data-analytics/docker-compose.yaml +++ b/preset/data-analytics/docker-compose.yaml @@ -15,6 +15,7 @@ # -*- coding: utf-8 -*- # + version: '3' services: data-analytics: @@ -22,26 +23,26 @@ services: args: BASE_IMAGE: ${BASE_IMAGE:-ubuntu} BASE_TAG: ${BASE_TAG:-22.04} - DPNP_VERSION: ${NUMBA_DPEX_VERSION:-0.14.0} - IDP_VERSION: ${IDP_VERSION:-2024.1.0} + DPNP_VERSION: ${DPNP_VERSION:-0.15.0} + IDP_VERSION: ${IDP_VERSION:-2024.2} INTEL_CHANNEL: ${INTEL_CHANNEL:-https://software.repos.intel.com/python/conda/} - MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Linux-x86_64} - MODIN_VERSION: ${MODIN_VERSION:-0.26.1} - MPI_VERSION: ${MPI_VERSION:-2021.12.0} - NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.22.1} + MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Miniforge3-Linux-x86_64} + MODIN_VERSION: ${MODIN_VERSION:-0.30.0} NUMPY_VERSION: ${NUMPY_VERSION:-1.26.4} - PYTHON_VERSION: ${PYTHON_VERSION:-3.10} + PYTHON_VERSION: ${PYTHON_VERSION:-3.9} + XGBOOST_VERSION: ${XGBOOST_VERSION:-2.0.3} http_proxy: ${http_proxy} https_proxy: ${https_proxy} no_proxy: '' context: . + target: data-analytics labels: docs: data_analytics org.opencontainers.image.title: "Intel® AI Tools Selector Preset Containers - Data Analytics" org.opencontainers.base.name: "ubuntu:22.04" org.opencontainers.image.name: "intel/data-analytics" - org.opencontainers.image.version: 2024.1.0-py${PYTHON_VERSION:-3.10} - dependency.python: ${PYTHON_VERSION:-3.10} + org.opencontainers.image.version: 2024.2.0-py${PYTHON_VERSION:-3.9} + dependency.python: ${PYTHON_VERSION:-3.9} dependency.python.pip: requirements.txt dependency.apt.bzip2: true dependency.apt.ca-certificates: true @@ -55,34 +56,21 @@ services: dependency.apt.unzip: true dependency.apt.wget: true dependency.apt.xz-utils: true - dependency.conda.jupyterlab: '>=4.1.8' - dependency.conda.notebook: '>=7.1.3' - dependency.conda.jupyterhub: '>=4.1.5' - dependency.conda.jupyter-server-proxy: '>=4.1.2' - dependency.conda.mako: '>=1.2.2' - dependency.conda.pyjwt: '>=2.4.0' - dependency.conda.cryptography: '>=42.0.5' - dependency.conda.nodejs: '>=20.12.2' - dependency.conda.idna: '>=3.7' - dependency.conda.tqdm: '>=4.66.2' - dependency.conda.dpnp: '>=0.14.0' - dependency.conda.numpy: '>=1.26.4' - dependency.conda.python: "=${PYTHON_VERSION:-3.10}" - dependency.conda.modin-ray: '>=0.26.1' - dependency.conda.python-dotenv: '>=1.0.1' - dependency.conda.matplotlib-base: '>=3.4.3' - dependency.conda.dataset_librarian: '>=1.0.4' - dependency.conda.threadpoolctl: '>=3.3.0' - dependency.conda.ipython: '>=8.18.1' - dependency.conda.ipykernel: '>=6.29.3' - dependency.conda.kernda: '>=0.3.0' - dependency.conda.protobuf: '>=4.24.4' - dependency.conda.pillow: '>=10.2.0' - dependency.conda.tornado: '>=6.3.3' - target: data-analytics-jupyter - command: > - bash -c "conda run -n data-analytics python -c 'import modin.pandas as pd, modin.config as cfg; cfg.Engine.put(\"Ray\"); df = pd.DataFrame([1]);print(df+1)'" - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-data-analytics-2024.1.0-py${PYTHON_VERSION:-3.10} + dependency.conda.colorama: '==0.4.6' + dependency.conda.conda: '==24.5.0' + dependency.conda.dpnp: '=0.15.0' + dependency.conda.ipykernel: '==6.29.5' + dependency.conda.jupyterhub: '==5.1.0' + dependency.conda.jupyter-server-proxy: '==4.3.0' + dependency.conda.kernda: '==0.3.0' + dependency.conda.mamba: '==1.5.8' + dependency.conda.matplotlib-base: '==3.8.4' + dependency.conda.modin-ray: '=0.30.0' + dependency.conda.networkx: '==3.3' + dependency.conda.notebook: '==7.2.1' + dependency.conda.python: '==3.10.14' + dependency.conda.python-dotenv: '==1.0.1' + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-data-analytics-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} environment: http_proxy: ${http_proxy} https_proxy: ${https_proxy} @@ -90,3 +78,7 @@ services: shm_size: 12GB volumes: - /dev/dri/by-path:/dev/dri/by-path + command: > + bash -c " conda run -n data-analytics python -c 'import modin.pandas as pd;import + modin.config as cfg;cfg.Engine.put(\"Ray\");df = pd.DataFrame([1]);print(df+1)' + " diff --git a/preset/data-analytics/requirements.txt b/preset/data-analytics/requirements.txt index d231202db..8fe3dfff8 100644 --- a/preset/data-analytics/requirements.txt +++ b/preset/data-analytics/requirements.txt @@ -1 +1 @@ -cloud-data-connector==1.0.3 +dataset-librarian==1.0.4 diff --git a/preset/deep-learning/Dockerfile b/preset/deep-learning/Dockerfile index 05721e111..213606b84 100644 --- a/preset/deep-learning/Dockerfile +++ b/preset/deep-learning/Dockerfile @@ -12,158 +12,148 @@ # See the License for the specific language governing permissions and # limitations under the License. + ARG BASE_IMAGE=ubuntu ARG BASE_TAG=22.04 -FROM ${BASE_IMAGE}:${BASE_TAG} AS dgpu-base +FROM ${BASE_IMAGE}:${BASE_TAG} AS deep-learning-base -ENV DEBIAN_FRONTEND=noninteractive +SHELL ["/bin/bash", "-c"] -# See http://bugs.python.org/issue19846 +ENV DEBIAN_FRONTEND=noninteractive ENV LANG C.UTF-8 ARG PYTHON_VERSION EXPOSE 8080 -ENV LANG=C.UTF-8 - -SHELL ["/bin/bash", "-c"] - RUN apt-get update -y && \ apt-get install -y --no-install-recommends --fix-missing \ - apt-utils \ - build-essential \ - bzip2 \ - ca-certificates \ - clinfo \ - cmake \ - diffutils \ - g++ \ - gcc \ - git \ - gnupg2 \ - gpg-agent \ - gzip \ - make \ - numactl \ - patch \ - rsync \ - unzip \ - wget \ - sudo \ - xz-utils && \ + apt-utils \ + build-essential \ + bzip2 \ + ca-certificates \ + clinfo \ + cmake \ + diffutils \ + g++ \ + gcc \ + git \ + gnupg2 \ + gpg-agent \ + gzip \ + make \ + numactl \ + patch \ + rsync \ + unzip \ + wget \ + sudo \ + xz-utils \ + && \ rm -rf /var/lib/apt/lists/* -# GPU Drivers setup ARG DEVICE ARG ICD_VER ARG LEVEL_ZERO_GPU_VER ARG LEVEL_ZERO_VER ARG LEVEL_ZERO_DEV_VER - -# Public Drivers link RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ - gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg -RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | \ + gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | \ tee /etc/apt/sources.list.d/intel-gpu-jammy.list RUN apt-get update && \ apt-get install -y --no-install-recommends --fix-missing \ - intel-opencl-icd="${ICD_VER}" \ - intel-level-zero-gpu="${LEVEL_ZERO_GPU_VER}" \ - level-zero="${LEVEL_ZERO_VER}" + intel-level-zero-gpu="${LEVEL_ZERO_GPU_VER}" \ + intel-opencl-icd="${ICD_VER}" \ + level-zero="${LEVEL_ZERO_VER}" RUN apt-get update && \ apt-get install -y --no-install-recommends --fix-missing \ - intel-media-va-driver-non-free \ - libmfx1 \ - libmfxgen1 \ - libvpl2 \ - libegl-mesa0 \ - libegl1-mesa \ - libegl1-mesa-dev \ - libgbm1 \ - libgl1-mesa-dev \ - libgl1-mesa-dri \ - libglapi-mesa \ - libgles2-mesa-dev \ - libglx-mesa0 \ - libigdgmm12 \ - libxatracker2 \ - mesa-va-drivers \ - mesa-vdpau-drivers \ - mesa-vulkan-drivers \ - va-driver-all \ - vainfo \ - hwinfo \ - clinfo + clinfo \ + hwinfo \ + intel-media-va-driver-non-free \ + libegl-mesa0 \ + libegl1-mesa \ + libegl1-mesa-dev \ + libgbm1 \ + libgl1-mesa-dev \ + libgl1-mesa-dri \ + libglapi-mesa \ + libgles2-mesa-dev \ + libglx-mesa0 \ + libigdgmm12 \ + libmfx1 \ + libmfxgen1 \ + libvpl2 \ + mesa-va-drivers \ + mesa-vdpau-drivers \ + mesa-vulkan-drivers \ + va-driver-all \ + vainfo RUN apt-get install -y --no-install-recommends --fix-missing \ - libigc-dev \ - intel-igc-cm \ - libigdfcl-dev \ - libigfxcmrt-dev \ - level-zero-dev="${LEVEL_ZERO_DEV_VER}" && \ - rm -rf /var/lib/apt/lists/* - -RUN rm /etc/apt/sources.list.d/*list + intel-igc-cm \ + libigc-dev \ + libigdfcl-dev \ + libigfxcmrt-dev \ + level-zero-dev="${LEVEL_ZERO_DEV_VER}" \ + && \ + rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/*list -FROM dgpu-base as deep-learning-python - -# Setting up non-root directories RUN useradd --uid 1000 -d /home/dev -s /bin/bash dev RUN groupadd -g 109 render -## Add the user to the required groups RUN usermod -aG root,sudo,video,render dev -# Set a password for the user (Optional) RUN echo 'dev:password' | chpasswd USER dev WORKDIR /home/dev ENV CONDA_ROOT=/home/dev/conda - -# Miniforge Python Installation ARG MINIFORGE_VERSION ARG PYTHON_VERSION ARG IDP_VERSION ARG INTEL_CHANNEL -RUN wget --progress=dot:giga --no-check-certificate "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-${MINIFORGE_VERSION}.sh" -O miniforge.sh && \ +RUN wget --progress=dot:giga --no-check-certificate "https://github.com/conda-forge/miniforge/releases/latest/download/${MINIFORGE_VERSION}.sh" -O miniforge.sh && \ chmod +x miniforge.sh && \ ./miniforge.sh -b -p "${CONDA_ROOT}" && \ rm ./miniforge.sh && \ - ln -s "${CONDA_ROOT}" "${CONDA_ROOT}/../miniforge3" && \ + ln -s "${CONDA_ROOT}" "${CONDA_ROOT}/../miniforge" && \ export PATH="${CONDA_ROOT}/bin/:${PATH}" && \ - conda update -y conda && \ - conda config --add channels conda-forge && \ - conda config --add channels https://software.repos.intel.com/python/conda/ && \ conda init --all && \ - conda install -c conda-forge \ - 'jupyterlab>=4.1.8' \ - 'notebook>=7.1.3' \ - 'jupyterhub>=4.1.5' \ - 'jupyter-server-proxy>=4.1.2' \ - 'mako>=1.2.2' \ - 'pyjwt>=2.4.0' \ - 'cryptography>=42.0.5' \ - 'nodejs>=20.12.2' \ + conda install -y \ + 'colorama==0.4.6' \ + 'conda==24.5.0' \ + 'jupyter-server-proxy==4.3.0' \ + 'jupyterhub==5.1.0' \ + 'ld_impl_linux-64==2.40' \ + 'mamba==1.5.8' \ + 'networkx==3.3' \ + 'notebook==7.2.1' \ + 'python==3.10.14' \ + 'aiohttp>=3.9.4' \ + 'certifi>=2024.07.04' \ 'idna>=3.7' \ - 'tqdm>=4.66.2' \ - && \ - jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ - conda clean -y --all + 'jinja2>=3.1.4' \ + 'requests>=2.32.0' \ + 'setuptools>=70.0.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + 'zipp>=3.19.1' \ + 'nodejs==22.5.1' \ + && \ + jupyter labextension disable "@jupyterlab/apputils-extension:announcements" \ + && \ + conda clean -y --all \ + && \ + conda config --add channels ${INTEL_CHANNEL} ENV PATH ${CONDA_ROOT}/condabin:${CONDA_ROOT}/bin/:${PATH} +RUN conda config --set pip_interop_enabled True -RUN conda config --set pip_interop_enabled True # Improve interoperabilty among conda an pypi packages - - -# PyTorch Installation -ARG IDP_VERSION ARG DPNP_VERSION ARG NUMPY_VERSION - ARG TORCH_CPU_VERSION ARG ONECCL_CPU_VERSION ARG IPEX_CPU_VERSION @@ -171,120 +161,94 @@ ARG TORCHVISION_CPU_VERSION ARG TORCHAUDIO_CPU_VERSION ARG DEEPSPEED_VERSION -# PyTorch CPU Env - conda packages -RUN conda create -yn pytorch-cpu -c "${INTEL_CHANNEL}" -c conda-forge \ - dpnp="${DPNP_VERSION}" \ - numpy="${NUMPY_VERSION}" \ - python="${PYTHON_VERSION}" \ - intel-openmp="${IDP_VERSION}" \ - pytorch="${TORCH_CPU_VERSION}" \ - oneccl_bind_pt="${ONECCL_CPU_VERSION}" \ - intel-extension-for-pytorch="${IPEX_CPU_VERSION}" \ - torchvision="${TORCHVISION_CPU_VERSION}" \ - torchaudio="${TORCHAUDIO_CPU_VERSION}" \ - 'matplotlib-base>=3.4.3' \ - 'ipykernel>=6.29.3' \ - 'kernda>=0.3.0' \ - 'pillow>=10.2.0' \ - 'aiohttp>=3.9.0' \ - 'tornado>=6.3.3' \ - 'jinja2>=3.1.3' \ +RUN conda create -yn 'pytorch-cpu' \ + -c huggingface \ + "python=${PYTHON_VERSION}" \ + 'accelerate==0.32.1' \ + "dpnp=${DPNP_VERSION}" \ + "intel-extension-for-pytorch=${IPEX_CPU_VERSION}" \ + 'ipykernel==6.29.5' \ + 'kernda==0.3.0' \ + 'matplotlib-base>=3.8.4' \ + "oneccl_bind_pt=${ONECCL_CPU_VERSION}" \ + "pytorch=${TORCH_CPU_VERSION}" \ + 'tensorboardx==2.6.2.2' \ + "torchaudio=${TORCHAUDIO_CPU_VERSION}" \ + "torchvision=${TORCHVISION_CPU_VERSION}" \ + 'python-dotenv==1.0.1' \ + 'aiohttp>=3.9.4' \ + 'certifi>=2024.07.04' \ 'idna>=3.7' \ - 'onnx>=1.15.0' \ + 'jinja2>=3.1.4' \ + 'onnx>=1.16.0' \ + 'requests>=2.32.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + 'zipp>=3.19.1' \ && \ conda clean -y --all -# PyPI packages -RUN conda run -n pytorch-cpu pip install --no-deps --no-cache-dir --ignore-installed \ - 'ninja>=1.11.1.1' \ - 'python-dotenv>=1.0.1' \ - 'tqdm>=4.66.2' \ - 'cloud-data-connector==1.0.3' \ - 'dataset-librarian==1.0.4' && \ - conda run -n pytorch-cpu pip install --no-cache-dir --ignore-installed \ - 'transformers>=4.40.2' \ - 'datasets>=2.19.1' \ - 'evaluate>=0.4.2' && \ - conda run -n pytorch-cpu pip install --no-cache-dir -U 'accelerate>=0.30.0' && \ - conda run -n pytorch-cpu pip install --no-cache-dir "git+https://github.com/huggingface/optimum-intel.git" && \ +RUN conda run -n 'pytorch-cpu' pip install --no-deps --no-cache-dir \ + 'dataset-librarian==1.0.4' \ + && \ + conda run -n 'pytorch-cpu' pip install --no-cache-dir \ + 'evaluate==0.4.2' \ + "git+https://github.com/huggingface/optimum-intel.git" \ + && \ conda clean -y --all - - -RUN conda run -n pytorch-cpu conda install 'protobuf=4.24' -c conda-forge --override --force-reinstall -y - -# PyTorch Installation ARG IDP_VERSION ARG DPNP_VERSION ARG NUMPY_VERSION - -ARG TORCH_GPU_VERSION -ARG ONECCL_GPU_VERSION -ARG IPEX_GPU_VERSION -ARG TORCHVISION_GPU_VERSION -ARG TORCHAUDIO_GPU_VERSION +ARG TORCH_XPU_VERSION +ARG ONECCL_XPU_VERSION +ARG IPEX_XPU_VERSION +ARG TORCHVISION_XPU_VERSION +ARG TORCHAUDIO_XPU_VERSION ARG IDEX_VERSION -ARG DEEPSPEED_VERSION -# PyTorch GPU Env - conda packages -RUN conda create -yn pytorch-gpu -c "${INTEL_CHANNEL}" -c conda-forge \ - dpnp="${DPNP_VERSION}" \ - dpcpp-cpp-rt="${IDP_VERSION}" \ - mkl-dpcpp="${IDP_VERSION}" \ - dpcpp_impl_linux-64="${IDP_VERSION}" \ - numpy="${NUMPY_VERSION}" \ - python="${PYTHON_VERSION}" \ - intel-openmp="${IDP_VERSION}" \ - python="${PYTHON_VERSION}" \ - pytorch="${TORCH_GPU_VERSION}" \ - oneccl_bind_pt="${ONECCL_GPU_VERSION}" \ - intel-extension-for-pytorch="${IPEX_GPU_VERSION}" \ - torchvision="${TORCHVISION_GPU_VERSION}" \ - torchaudio="${TORCHAUDIO_GPU_VERSION}" \ - 'tensorboardx>=2.6.2.2' \ - 'matplotlib-base>=3.4.3' \ - 'pandas>=2.2.2' \ - 'ipython>=8.18.1' \ - 'ipykernel>=6.29.3' \ - 'kernda>=0.3.0' \ - 'pillow>=10.2.0' \ - 'aiohttp>=3.9.0' \ - 'tornado>=6.3.3' \ - 'jinja2>=3.1.3' \ +RUN conda create -yn 'pytorch-gpu' \ + -c huggingface \ + "python=${PYTHON_VERSION}" \ + 'accelerate==0.32.1' \ + "dpnp=${DPNP_VERSION}" \ + "intel-extension-for-pytorch=${IPEX_XPU_VERSION}" \ + 'ipykernel==6.29.5' \ + 'kernda==0.3.0' \ + 'matplotlib-base>=3.8.4' \ + "oneccl_bind_pt=${ONECCL_XPU_VERSION}" \ + "pytorch=${TORCH_XPU_VERSION}" \ + 'tensorboardx==2.6.2.2' \ + "torchaudio=${TORCHAUDIO_XPU_VERSION}" \ + "torchvision=${TORCHVISION_XPU_VERSION}" \ + 'python-dotenv==1.0.1' \ + 'aiohttp>=3.9.4' \ + 'certifi>=2024.07.04' \ 'idna>=3.7' \ - 'onnx>=1.15.0' \ - 'packaging=23.2' \ - 'setuptools=69.1.0' \ + 'jinja2>=3.1.4' \ + 'onnx>=1.16.0' \ + 'requests>=2.32.0' \ + 'tqdm>=4.66.3' \ + 'urllib3>=2.2.2' \ + 'zipp>=3.19.1' \ && \ conda clean -y --all -# PyPI packages -RUN conda run -n pytorch-gpu pip install --no-deps --no-cache-dir --ignore-installed \ - 'ninja>=1.11.1.1' \ - 'python-dotenv>=1.0.1' \ - 'tqdm>=4.66.2' \ - 'cloud-data-connector==1.0.3' \ - 'dataset-librarian==1.0.4' && \ - conda run -n pytorch-gpu pip install --no-cache-dir --ignore-installed \ - 'transformers>=4.40.2' \ - 'datasets>=2.19.1' \ - 'evaluate>=0.4.2' && \ - conda run -n pytorch-gpu pip install --no-cache-dir -U 'accelerate>=0.30.0' && \ - conda run -n pytorch-gpu pip install --no-cache-dir "git+https://github.com/huggingface/optimum-intel.git" && \ +RUN conda run -n 'pytorch-gpu' pip install --no-deps --no-cache-dir \ + 'dataset-librarian==1.0.4' \ + && \ + conda run -n 'pytorch-gpu' pip install --no-cache-dir \ + 'evaluate==0.4.2' \ + "git+https://github.com/huggingface/optimum-intel.git" \ + && \ conda clean -y --all - - -RUN conda run -n pytorch-gpu conda install 'protobuf=4.24' -c conda-forge --override --force-reinstall -y - - -# TensorFlow Installation ARG IDP_VERSION ARG DPNP_VERSION ARG NUMPY_VERSION - ARG TF_VERSION -ARG ITEX_VERSION +ARG ITEX_CPU_VERSION +ARG ITEX_XPU_VERSION ARG HOROVOD_VERSION ARG IMPI_VERSION @@ -293,149 +257,122 @@ ARG HOROVOD_WITHOUT_MXNET=1 ARG HOROVOD_WITHOUT_GLOO=1 ARG HOROVOD_WITH_MPI=1 - -# Tensorflow Env - conda packages -RUN conda create -yn tensorflow-cpu -c "${INTEL_CHANNEL}" -c conda-forge \ - dpnp="${DPNP_VERSION}" \ - dpcpp-cpp-rt="${IDP_VERSION}" \ - mkl-dpcpp="${IDP_VERSION}" \ - numpy="${NUMPY_VERSION}" \ - python="${PYTHON_VERSION}" \ - intel-extension-for-tensorflow="${ITEX_VERSION}=*cpu*" \ - intel-optimization-for-horovod="${INTEL_HOROVOD}" \ - tensorflow="${TF_VERSION}" \ - impi-devel="${IMPI_VERSION}" \ - 'matplotlib-base>=3.4.3' \ - 'ipython>=8.18.1' \ - 'ipykernel>=6.29.3' \ - 'kernda>=0.3.0' \ - 'pillow>=10.2.0' \ - 'cryptography>=42.0.4' \ - 'werkzeug>=2.2.3' \ - 'aiohttp>=3.9.0' \ - 'tornado>=6.3.3' \ - 'pyjwt>=2.8.0' \ - 'oauthlib>=3.2.2' \ - 'idna>=3.7' \ +RUN conda create -yn 'tensorflow-cpu' \ + "python=${PYTHON_VERSION}" \ + "dpnp=${DPNP_VERSION}" \ + "intel-extension-for-tensorflow=${ITEX_CPU_VERSION}=*cpu*" \ + "intel-optimization-for-horovod=${HOROVOD_VERSION}" \ + 'ipykernel==6.29.5' \ + 'kernda==0.3.0' \ + 'matplotlib-base>=3.8.4' \ 'onnx>=1.14.1' \ + 'py-cpuinfo==9.0.0' \ + "tensorflow=${TF_VERSION}" \ + 'tensorflow-hub==0.16.1' \ + 'tqdm==4.66.4' \ + 'python-dotenv==1.0.1' \ + 'aiohttp>=3.9.4' \ + 'certifi>=2024.07.04' \ + 'idna>=3.7' \ + 'requests>=2.32.0' \ + 'urllib3>=2.2.2' \ + 'werkzeug>=3.0.3' \ + 'zipp>=3.19.1' \ && \ conda clean -y --all -# PyPI packages -RUN conda run -n tensorflow-cpu pip install --no-cache-dir --ignore-installed \ - 'py-cpuinfo>=9.0.0' \ - 'requests>=2.31.0' \ - 'cryptography>=42.0.7' -RUN conda run -n tensorflow-cpu pip install --no-deps --no-cache-dir --ignore-installed \ - 'tensorflow-hub>=0.16.1' \ - 'tqdm>=4.66.2' \ +RUN conda run -n 'tensorflow-cpu' pip install --no-deps --no-cache-dir \ 'dataset-librarian==1.0.4' \ - 'cloud-data-connector>=1.0.3' && \ + && \ conda clean -y --all -# Tensorflow Env - conda packages -RUN conda create -yn tensorflow-gpu -c "${INTEL_CHANNEL}" -c conda-forge \ - dpnp="${DPNP_VERSION}" \ - dpcpp-cpp-rt="${IDP_VERSION}" \ - mkl-dpcpp="${IDP_VERSION}" \ - numpy="${NUMPY_VERSION}" \ - python="${PYTHON_VERSION}" \ - intel-extension-for-tensorflow="${ITEX_VERSION}=*xpu*" \ - intel-optimization-for-horovod="${INTEL_HOROVOD}" \ - tensorflow="${TF_VERSION}" \ - impi-devel="${IMPI_VERSION}" \ - 'matplotlib-base>=3.4.3' \ - 'ipython>=8.18.1' \ - 'ipykernel>=6.29.3' \ - 'kernda>=0.3.0' \ - 'pillow>=10.2.0' \ - 'cryptography>=42.0.4' \ - 'werkzeug>=2.2.3' \ - 'aiohttp>=3.9.0' \ - 'tornado>=6.3.3' \ - 'pyjwt>=2.8.0' \ - 'oauthlib>=3.2.2' \ - 'idna>=3.7' \ +RUN conda create -yn 'tensorflow-gpu' \ + "python=${PYTHON_VERSION}" \ + "dpnp=${DPNP_VERSION}" \ + "intel-extension-for-tensorflow=${ITEX_XPU_VERSION}=*xpu*" \ + "intel-optimization-for-horovod=${HOROVOD_VERSION}" \ + 'ipykernel==6.29.5' \ + 'kernda==0.3.0' \ + 'matplotlib-base>=3.8.4' \ 'onnx>=1.14.1' \ - 'packaging=23.2' \ - 'setuptools=69.1.0' \ + 'py-cpuinfo==9.0.0' \ + "tensorflow=${TF_VERSION}" \ + 'tensorflow-hub==0.16.1' \ + 'tqdm==4.66.4' \ + 'python-dotenv==1.0.1' \ + 'aiohttp>=3.9.4' \ + 'certifi>=2024.07.04' \ + 'idna>=3.7' \ + 'requests>=2.32.0' \ + 'urllib3>=2.2.2' \ + 'zipp>=3.19.1' \ && \ conda clean -y --all -# PyPI packages -RUN conda run -n tensorflow-gpu pip install --no-cache-dir --ignore-installed \ - 'py-cpuinfo>=9.0.0' \ - 'requests>=2.31.0' \ - 'cryptography>=42.0.7' -RUN conda run -n tensorflow-gpu pip install --no-deps --no-cache-dir --ignore-installed \ - 'tensorflow-hub>=0.16.1' \ - 'tqdm>=4.66.2' \ +RUN conda run -n 'tensorflow-gpu' pip install --no-deps --no-cache-dir \ 'dataset-librarian==1.0.4' \ - 'cloud-data-connector==1.0.3' && \ + && \ conda clean -y --all -FROM deep-learning-python as deep-learning-jupyter - -ARG KERNEL_NAME_TF_CPU="Intel TensorFlow cpu" -ARG KERNEL_NAME_TF_GPU="Intel TensorFlow gpu" -ARG KERNEL_NAME_PT_CPU="Intel PyTorch cpu" -ARG KERNEL_NAME_PT_GPU="Intel PyTorch gpu" - EXPOSE 8888 RUN mkdir -p ~/jupyter/ && chmod -R a+rwx ~/jupyter/ && \ mkdir ~/.local && chmod a+rwx ~/.local RUN \ - "${CONDA_ROOT}/envs/pytorch-cpu/bin/python" -m ipykernel install --user --name pytorch-cpu --display-name "${KERNEL_NAME_PT_CPU}" && \ - "${CONDA_ROOT}/envs/pytorch-cpu/bin/kernda" -o -y "$HOME/.local/share/jupyter/kernels/$(echo pytorch-cpu | sed -e 's/\(.*\)/\L\1/')/kernel.json" && \ - "${CONDA_ROOT}/envs/pytorch-gpu/bin/python" -m ipykernel install --user --name pytorch-gpu --display-name "${KERNEL_NAME_PT_GPU}" && \ - "${CONDA_ROOT}/envs/pytorch-gpu/bin/kernda" -o -y "$HOME/.local/share/jupyter/kernels/$(echo pytorch-gpu | sed -e 's/\(.*\)/\L\1/')/kernel.json" && \ - "${CONDA_ROOT}/envs/tensorflow-cpu/bin/python" -m ipykernel install --user --name tensorflow-cpu --display-name "${KERNEL_NAME_TF_CPU}" && \ - "${CONDA_ROOT}/envs/tensorflow-cpu/bin/kernda" -o -y "$HOME/.local/share/jupyter/kernels/$(echo tensorflow-cpu | sed -e 's/\(.*\)/\L\1/')/kernel.json" && \ - "${CONDA_ROOT}/envs/tensorflow-gpu/bin/python" -m ipykernel install --user --name tensorflow-gpu --display-name "${KERNEL_NAME_TF_GPU}" && \ - "${CONDA_ROOT}/envs/tensorflow-gpu/bin/kernda" -o -y "$HOME/.local/share/jupyter/kernels/$(echo tensorflow-gpu | sed -e 's/\(.*\)/\L\1/')/kernel.json" && \ - python -m ipykernel.kernelspec --user + ENVS_LIST=('pytorch-cpu' 'pytorch-gpu' 'tensorflow-cpu' 'tensorflow-gpu') && \ + KERNEL_NAMES=('Intel PyTorch CPU' 'Intel PyTorch GPU' 'Intel TensorFlow CPU' 'Intel TensorFlow GPU') && \ + for i in "${!ENVS_LIST[@]}"; do \ + CONDA_ENV="${ENVS_LIST[i]}" && \ + KERNEL_NAME="${KERNEL_NAMES[i]}" && \ + KERNEL_DIR="${CONDA_ROOT}/share/jupyter/kernels/$CONDA_ENV" && \ + conda run -n "$CONDA_ENV" python -m ipykernel install --prefix "$CONDA_ROOT" --name "$CONDA_ENV" --display-name "$KERNEL_NAME" && \ + conda run -n "$CONDA_ENV" kernda -o -y "$KERNEL_DIR/kernel.json" && \ + conda run -n base jupyter kernelspec list \ + ; done CMD ["bash", "-c", "jupyter lab --notebook-dir=~/jupyter --port 8888 --ip 0.0.0.0 --no-browser --allow-root"] -FROM deep-learning-jupyter as distributed-deep-learning +FROM deep-learning-base as deep-learning +SHELL ["/bin/bash", "-c"] USER root -# Install OpenMPI -RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \ - libopenmpi-dev \ - openmpi-bin \ - openmpi-common +RUN apt-get update -y && \ + apt-get install -y --no-install-recommends --fix-missing \ + libopenmpi-dev \ + openmpi-bin \ + openmpi-common ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ENV OMPI_MCA_tl_tcp_if_exclude="lo,docker0" -# Install OpenSSH RUN apt-get install -y --no-install-recommends --fix-missing \ - openssh-client \ - openssh-server && \ - rm /etc/ssh/ssh_host_*_key \ - /etc/ssh/ssh_host_*_key.pub && \ - rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /var/run/sshd && \ + openssh-client \ + openssh-server \ + && \ + rm -rf \ + /etc/ssh/ssh_host_*_key \ + /etc/ssh/ssh_host_*_key.pub \ + /var/lib/apt/lists/* \ + && \ + mkdir -p /var/run/sshd \ + && \ echo 'LoginGraceTime 0' >> /etc/ssh/sshd_config -# https://github.com/openucx/ucx/issues/4742#issuecomment-584059909 ENV UCX_TLS=ud,sm,self USER dev -RUN conda install -n pytorch-cpu -c "${INTEL_CHANNEL}" -c conda-forge \ - deepspeed="${DEEPSPEED_VERSION}" \ - 'tensorboardx>=2.6.2.2' - -RUN conda install -n pytorch-gpu -c "${INTEL_CHANNEL}" -c conda-forge \ - deepspeed="${DEEPSPEED_VERSION}" \ - 'tensorboardx>=2.6.2.2' +RUN ENVS_LIST=('pytorch-cpu' 'pytorch-gpu') && \ + for i in "${!ENVS_LIST[@]}"; do \ + CONDA_ENV="${ENVS_LIST[i]}" && \ + conda install -yn "$CONDA_ENV" \ + "deepspeed=${DEEPSPEED_VERSION}" \ + 'tensorboardx==2.6.2.2' \ + ; done && \ + conda clean -y --all COPY --chown=dev notebooks /home/dev/jupyter COPY --chown=dev tests /home/dev/sample-tests diff --git a/preset/deep-learning/docker-compose.yaml b/preset/deep-learning/docker-compose.yaml index 663e064c7..023b6f825 100644 --- a/preset/deep-learning/docker-compose.yaml +++ b/preset/deep-learning/docker-compose.yaml @@ -15,6 +15,7 @@ # -*- coding: utf-8 -*- # + version: '3' services: dl-base: @@ -22,44 +23,42 @@ services: args: BASE_IMAGE: ${BASE_IMAGE:-ubuntu} BASE_TAG: ${BASE_TAG:-22.04} - DEEPSPEED_VERSION: ${DEEPSPEED_VERSION:-0.14.0} + DEEPSPEED_VERSION: ${DEEPSPEED_VERSION:-0.14.2} DEVICE: ${DEVICE:-flex} - DPNP_VERSION: ${NUMBA_DPEX_VERSION:-0.14.0} - HOROVOD_VERSION: ${HOROVOD_VERSION:-0.28.1.4} - ICD_VER: 23.43.27642.40-803~22.04 - IDP_VERSION: ${IDP_VERSION:-2024.1.0} - IMPI_VERSION: ${IMPI_VERSION:-2021.12} + DPNP_VERSION: ${DPNP_VERSION:-0.15.0} + HOROVOD_VERSION: ${HOROVOD_VERSION:-0.28.1.5} + ICD_VER: 23.43.27642.52-803~22.04 + IDP_VERSION: ${IDP_VERSION:-2024.2} + IMPI_VERSION: ${IMPI_VERSION:-2021.13} INTEL_CHANNEL: ${INTEL_CHANNEL:-https://software.repos.intel.com/python/conda/} - IPEX_CPU_VERSION: ${IPEX_CPU_VERSION:-2.2.0=*cpu*} - IPEX_GPU_VERSION: ${IPEX_GPU_VERSION:-2.1.20=*xpu*} - ITEX_VERSION: ${ITEX_VERSION:-2.15} + IPEX_CPU_VERSION: ${IPEX_CPU_VERSION:-2.3.100} + IPEX_XPU_VERSION: ${IPEX_XPU_VERSION:-2.1.40} + ITEX_CPU_VERSION: ${ITEX_CPU_VERSION:-2.15.0} + ITEX_XPU_VERSION: ${ITEX_XPU_VERSION:-2.15.0.1} LEVEL_ZERO_DEV_VER: 1.14.0-744~22.04 - LEVEL_ZERO_GPU_VER: 1.3.27642.40-803~22.04 + LEVEL_ZERO_GPU_VER: 1.3.27642.52-803~22.04 LEVEL_ZERO_VER: 1.14.0-744~22.04 - MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Linux-x86_64} - MPI_VERSION: ${MPI_VERSION:-2021.12.0} - NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.22.1} + MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Miniforge3-Linux-x86_64} + MPI_VERSION: ${MPI_VERSION:-2021.13} + NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.23.0} NUMPY_VERSION: ${NUMPY_VERSION:-1.26.4} - ONECCL_CPU_VERSION: ${ONECCL_CPU_VERSION:-2.2.0=*cpu*} - ONECCL_GPU_VERSION: ${ONECCL_GPU_VERSION:-2.1.200=*xpu*} - PYTHON_VERSION: ${PYTHON_VERSION:-3.10} - TF_VERSION: ${TF_VERSION:-2.15} - TORCHAUDIO_CPU_VERSION: ${TORCHAUDIO_CPU_VERSION:-2.2.0=*cpu*} - TORCHAUDIO_GPU_VERSION: ${TORCHAUDIO_GPU_VERSION:-2.1.0=*xpu*} - TORCHVISION_CPU_VERSION: ${TORCHVISION_CPU_VERSION:-0.17=*cpu*} - TORCHVISION_GPU_VERSION: ${TORCHVISION_GPU_VERSION:-0.16.0=*xpu*} - TORCH_CPU_VERSION: ${TORCH_CPU_VERSION:-2.2.0=*cpu*} - TORCH_GPU_VERSION: ${TORCH_GPU_VERSION:-2.1.0=*xpu*} + ONECCL_CPU_VERSION: ${ONECCL_CPU_VERSION:-2.3.0} + ONECCL_XPU_VERSION: ${ONECCL_XPU_VERSION:-2.1.400} + PYTHON_VERSION: ${PYTHON_VERSION:-3.9} + TF_VERSION: ${TF_VERSION:-2.15.1} + TORCHAUDIO_CPU_VERSION: ${TORCHAUDIO_CPU_VERSION:-2.3.1} + TORCHAUDIO_XPU_VERSION: ${TORCHAUDIO_XPU_VERSION:-2.1.0} + TORCHVISION_CPU_VERSION: ${TORCHVISION_CPU_VERSION:-0.18.1} + TORCHVISION_XPU_VERSION: ${TORCHVISION_XPU_VERSION:-0.16.0} + TORCH_CPU_VERSION: ${TORCH_CPU_VERSION:-2.3.1} + TORCH_XPU_VERSION: ${TORCH_XPU_VERSION:-2.1.0} http_proxy: ${http_proxy} https_proxy: ${https_proxy} no_proxy: '' context: . labels: docs: false - target: deep-learning-jupyter - command: | - bash -c "conda run -n pytorch-cpu python -c 'import torch;print(torch.__version__);import intel_extension_for_pytorch as ipex;print(ipex.__version__);' && \ - conda run -n tensorflow-cpu python -c 'import tensorflow as tf; print(tf.__version__)'" + target: deep-learning-base environment: http_proxy: ${http_proxy} https_proxy: ${https_proxy} @@ -67,15 +66,24 @@ services: shm_size: 12GB volumes: - /dev/dri/by-path:/dev/dri/by-path + command: > + bash -c " conda run -n pytorch-cpu python -c 'import torch;print(torch.__version__);import + intel_extension_for_pytorch as ipex;print(ipex.__version__);' && + + conda run -n tensorflow-cpu python -c 'import tensorflow as tf;print(tf.__version__)' + " + + deep-learning: build: + target: deep-learning labels: docs: deep_learning org.opencontainers.image.title: "Intel® AI Tools Selector Preset Containers - Deep Learning" org.opencontainers.base.name: "ubuntu:22.04" org.opencontainers.image.name: "intel/deep-learning" - org.opencontainers.image.version: 2024.1.0-py${PYTHON_VERSION:-3.10} - dependency.python: ${PYTHON_VERSION:-3.10} + org.opencontainers.image.version: 2024.2.0-py${PYTHON_VERSION:-3.9} + dependency.python: ${PYTHON_VERSION:-3.9} dependency.python.pip: requirements.txt dependency.apt.apt-utils: true dependency.apt.build-essential: true @@ -92,11 +100,11 @@ services: dependency.apt.gzip: true dependency.apt.hwinfo: true dependency.apt.intel-igc-cm: true - dependency.apt.intel-level-zero-gpu: '=1.3.27642.40-803~22.04' + dependency.apt.intel-level-zero-gpu: true dependency.apt.intel-media-va-driver-non-free: true - dependency.apt.intel-opencl-icd: '=23.43.27642.40-803~22.04' - dependency.apt.level-zero: '=1.14.0-744~22.04' - dependency.apt.level-zero-dev: '=1.14.0-744~22.04' + dependency.apt.intel-opencl-icd: true + dependency.apt.level-zero: true + dependency.apt.level-zero-dev: true dependency.apt.libegl1-mesa: true dependency.apt.libegl1-mesa-dev: true dependency.apt.libegl-mesa0: true @@ -114,7 +122,6 @@ services: dependency.apt.libmfxgen1: true dependency.apt.libopenmpi-dev: true dependency.apt.libvpl2: true - dependency.apt.libxatracker2: true dependency.apt.make: true dependency.apt.mesa-va-drivers: true dependency.apt.mesa-vdpau-drivers: true @@ -132,69 +139,71 @@ services: dependency.apt.vainfo: true dependency.apt.wget: true dependency.apt.xz-utils: true - dependency.conda.jupyterlab: '>=4.1.8' - dependency.conda.aiohttp: '>=3.9.0' - dependency.conda.cryptography: '>=42.0.4' - dependency.conda.dataset_librarian: '>=1.0.4' - dependency.conda.deepspeed: '=0.14.0' - dependency.conda.dpcpp_impl_linux-64: '=2024.1.0' - dependency.conda.dpcpp-cpp-rt: '=2024.1.0' - dependency.conda.dpnp: '=0.14.0' - dependency.conda.idna: '>=3.7' - dependency.conda.impi-devel: '=2021.12' - dependency.conda.intel-extension-for-pytorch_cpu: '=2.2.0=*cpu*' - dependency.conda.intel-extension-for-pytorch_gpu: '=2.1.20=*xpu*' - dependency.conda.intel-extension-for-tensorflow_cpu: '=2.15=*cpu*' - dependency.conda.intel-extension-for-tensorflow_gpu: '=2.15=*xpu*' - dependency.conda.intel-openmp: '=2024.1.0' - dependency.conda.intel-optimization-for-horovod: '=0.28.1.4' - dependency.conda.ipykernel: '>=6.29.3' - dependency.conda.ipython: '>=8.18.1' - dependency.conda.jinja2: '>=3.1.3' - dependency.conda.jupyterhub: '>=4.1.5' - dependency.conda.jupyter-server-proxy: '>=4.1.2' - dependency.conda.kernda: '>=0.3.0' - dependency.conda.mako: '>=1.2.2' - dependency.conda.matplotlib-base: '>=3.4.3' - dependency.conda.mkl-dpcpp: '2024.1.0' - dependency.conda.nodejs: '>=20.12.2' - dependency.conda.notebook: '>=7.1.3' - dependency.conda.numpy: '=1.26.4' - dependency.conda.oauthlib: '>=3.2.2' - dependency.conda.oneccl_bind_pt_cpu: '=2.2.0=*cpu*' - dependency.conda.oneccl_bind_pt_gpu: '=2.1.200=*xpu*' + dependency.conda.accelerate: '==0.32.1' + dependency.conda.colorama: '==0.4.6' + dependency.conda.conda: '==24.5.0' + dependency.conda.dpnp: '=0.15.0' + dependency.conda.intel-extension-for-pytorch_cpu: '=2.3.100' + dependency.conda.intel-extension-for-pytorch_xpu: '=2.1.40' + dependency.conda.intel-extension-for-tensorflow_cpu: '=2.15.0=*cpu*' + dependency.conda.intel-extension-for-tensorflow_xpu: '=2.15.0.1=*xpu*' + dependency.conda.intel-optimization-for-horovod: '=0.28.1.5' + dependency.conda.ipykernel: '==6.29.5' + dependency.conda.jupyterhub: '==5.1.0' + dependency.conda.jupyter-server-proxy: '==4.3.0' + dependency.conda.kernda: '==0.3.0' + dependency.conda.ld_impl_linux-64: '==2.40' + dependency.conda.mamba: '==1.5.8' + dependency.conda.matplotlib-base: '>=3.8.4' + dependency.conda.mpi: '==1.0' + dependency.conda.mpich: '==4.2.2' + dependency.conda.networkx: '==3.3' + dependency.conda.notebook: '==7.2.1' + dependency.conda.oneccl_bind_pt_cpu: '=2.3.0' + dependency.conda.oneccl_bind_pt_xpu: '=2.1.400' dependency.conda.onnx: '>=1.14.1' - dependency.conda.packaging: '=23.2' - dependency.conda.pandas: '>=2.2.2' - dependency.conda.pillow: '>=10.2.0' - dependency.conda.protobuf: '=4.24' - dependency.conda.pyjwt: '>=2.4.0' - dependency.conda.python: "=${PYTHON_VERSION:-3.10}" - dependency.conda.pytorch_cpu: '=2.2.0=*cpu*' - dependency.conda.pytorch_gpu: '=2.1.0=*xpu*' - dependency.conda.setuptools: '=69.1.0' - dependency.conda.tensorboardx: '>=2.6.2.2' - dependency.conda.tensorflow: '=2.15' - dependency.conda.torchaudio_cpu: '=2.2.0=*cpu*' - dependency.conda.torchaudio_gpu: '=2.1.0=*xpu*' - dependency.conda.torchvision_cpu: '=0.17=*cpu*' - dependency.conda.torchvision_gpu: '=0.16.0=*xpu*' - dependency.conda.tornado: '>=6.3.3' - dependency.conda.tqdm: '>=4.66.2' - dependency.conda.werkzeug: '>=2.2.3' - target: distributed-deep-learning + dependency.conda.py-cpuinfo: '==9.0.0' + dependency.conda.python: '==3.10.14' + dependency.conda.pytorch_cpu: '=2.3.1' + dependency.conda.pytorch_xpu: '=2.1.0' + dependency.conda.tensorboardx: '==2.6.2.2' + dependency.conda.tensorflow: '=2.15.1' + dependency.conda.tensorflow-hub: '==0.16.1' + dependency.conda.torchaudio_cpu: '=2.3.1' + dependency.conda.torchaudio_xpu: '=2.1.0' + dependency.conda.torchvision_cpu: '=0.18.1' + dependency.conda.torchvision_xpu: '=0.16.0' + dependency.conda.tqdm: '==4.66.4' depends_on: - dl-base extends: dl-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-2024.1.0-py${PYTHON_VERSION:-3.10} - command: | - bash -c "conda run -n pytorch-cpu python -c 'import torch;print(torch.__version__);import intel_extension_for_pytorch as ipex;print(ipex.__version__);' && \ - conda run -n pytorch-cpu bash -c 'mpirun --version' && \ - conda run -n pytorch-cpu python -c 'import oneccl_bindings_for_pytorch as oneccl;print(\"\\nOneCCL:\", oneccl.__version__)' && \ - conda run -n pytorch-gpu python -c 'import torch;print(torch.device(\"xpu\"));import intel_extension_for_pytorch as ipex;print(ipex.xpu.is_available());print(ipex.xpu.has_onemkl())' && \ - conda run -n pytorch-gpu bash -c 'mpirun --version' && \ - conda run -n pytorch-gpu python -c 'import oneccl_bindings_for_pytorch as oneccl;print(\"\\nOneCCL:\", oneccl.__version__)' && \ - conda run -n tensorflow-cpu python -c 'import tensorflow;print(tensorflow.__version__);import intel_extension_for_tensorflow as itex;print(itex.__version__)' && \ - conda run -n tensorflow-gpu python -c 'from tensorflow.python.client import device_lib; print(device_lib.list_local_devices())' && \ - conda run -n tensorflow-gpu bash -c 'horovodrun --check-build && mpirun --version' && \ - conda run -n tensorflow-gpu python -c 'import horovod.tensorflow as hvd;hvd.init();import horovod.tensorflow'" + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + command: > + bash -c " conda run -n pytorch-cpu python -c 'import torch;print(torch.__version__);import + intel_extension_for_pytorch as ipex;print(ipex.__version__);' && + + conda run -n pytorch-cpu bash -c 'mpirun --version' && + + conda run -n pytorch-cpu python -c 'import oneccl_bindings_for_pytorch as oneccl;print(\"\\nOneCCL:\", + oneccl.__version__)' && + + conda run -n pytorch-gpu python -c 'import torch;print(torch.device(\"xpu\"));import + intel_extension_for_pytorch as ipex;print(ipex.xpu.is_available());print(ipex.xpu.has_onemkl())' + && + + conda run -n pytorch-gpu bash -c 'mpirun --version' && + + conda run -n pytorch-gpu python -c 'import oneccl_bindings_for_pytorch as oneccl;print(\"\\nOneCCL:\", + oneccl.__version__)' && + + conda run -n tensorflow-cpu python -c 'import tensorflow;print(tensorflow.__version__);import + intel_extension_for_tensorflow as itex;print(itex.__version__)' && + + conda run -n tensorflow-gpu python -c 'from tensorflow.python.client import + device_lib;print(device_lib.list_local_devices())' && + + conda run -n tensorflow-gpu bash -c 'horovodrun --check-build && mpirun --version' + && + + conda run -n tensorflow-gpu python -c 'import horovod.tensorflow as hvd;hvd.init();import + horovod.tensorflow' " diff --git a/preset/deep-learning/requirements.txt b/preset/deep-learning/requirements.txt index 4122126b5..db93ef0df 100644 --- a/preset/deep-learning/requirements.txt +++ b/preset/deep-learning/requirements.txt @@ -1,14 +1,3 @@ -accelerate>=0.30.0 -cloud-data-connector>=1.0.3 -cryptography>=42.0.7 -dataset-librarian>=1.0.4 -datasets>=2.19.1 -evaluate>=0.4.2 +dataset-librarian==1.0.4 +evaluate==0.4.2 git+https://github.com/huggingface/optimum-intel.git -ninja>=1.11.1.1 -py-cpuinfo>=9.0.0 -python-dotenv>=1.0.1 -requests>=2.31.0 -tensorflow-hub>=0.16.1 -tqdm>=4.66.2 -transformers>=4.40.2 diff --git a/preset/deep-learning/tests.yaml b/preset/deep-learning/tests.yaml old mode 100644 new mode 100755 index 0b0cdcaeb..399d42918 --- a/preset/deep-learning/tests.yaml +++ b/preset/deep-learning/tests.yaml @@ -12,39 +12,50 @@ # See the License for the specific language governing permissions and # limitations under the License. +--- deep-learning-ipex-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n pytorch-cpu python -W ignore sample-tests/intel_extension_for_pytorch/test_ipex.py --device cpu --ipex - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} deep-learning-ipex-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n pytorch-gpu python -W ignore sample-tests/intel_extension_for_pytorch/test_ipex.py --device xpu --ipex - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] + deep-learning-ipex-notebook-${PYTHON_VERSION:-3.9}-cpu: cmd: papermill --log-output jupyter/ipex/ResNet50_Inference.ipynb -k pytorch-cpu - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True deep-learning-ipex-notebook-${PYTHON_VERSION:-3.9}-gpu: cmd: papermill --log-output jupyter/ipex/ResNet50_Inference.ipynb -k pytorch-gpu - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True + device: ["/dev/dri"] + deep-learning-ipex-quantization-notebook-${PYTHON_VERSION:-3.9}-cpu: cmd: papermill --log-output jupyter/ipex-quantization/IntelPytorch_Quantization.ipynb -k pytorch-cpu - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True + deep-learning-itex-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n tensorflow-cpu python -W ignore sample-tests/intel_extension_for_tensorflow/test_itex.py - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} deep-learning-itex-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n tensorflow-gpu python -W ignore sample-tests/intel_extension_for_tensorflow/test_itex.py - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] + deep-learning-tensorflow-dataset-librarian-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n tensorflow-cpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} deep-learning-tensorflow-dataset-librarian-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n tensorflow-gpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] + deep-learning-torch-dataset-librarian-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n pytorch-cpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} deep-learning-torch-dataset-librarian-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n pytorch-gpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-deep-learning-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] diff --git a/preset/inference-optimization/Dockerfile b/preset/inference-optimization/Dockerfile index 6689b4370..a38e82664 100644 --- a/preset/inference-optimization/Dockerfile +++ b/preset/inference-optimization/Dockerfile @@ -12,35 +12,34 @@ # See the License for the specific language governing permissions and # limitations under the License. + ARG COMPOSE_PROJECT_NAME FROM ${COMPOSE_PROJECT_NAME}-dl-base as inference-optimization -ENV SIGOPT_PROJECT=. +SHELL ["/bin/bash", "-c"] +ENV SIGOPT_PROJECT=. ARG NEURAL_COMPRESSOR_VERSION ARG INTEL_CHANNEL - -RUN conda install -yn pytorch-cpu -c "${INTEL_CHANNEL}" -c conda-forge \ - neural-compressor="${NEURAL_COMPRESSOR_VERSION}" - -RUN conda install -yn pytorch-gpu -c "${INTEL_CHANNEL}" -c conda-forge \ - neural-compressor="${NEURAL_COMPRESSOR_VERSION}" - -RUN conda install -yn tensorflow-cpu -c "${INTEL_CHANNEL}" -c conda-forge \ - neural-compressor="${NEURAL_COMPRESSOR_VERSION}" - -RUN conda install -yn tensorflow-gpu -c "${INTEL_CHANNEL}" -c conda-forge \ - neural-compressor="${NEURAL_COMPRESSOR_VERSION}" - -RUN conda run -n tensorflow-cpu python -m pip install --no-deps --no-cache-dir \ - 'tf2onnx>=1.16.1' \ - 'onnxruntime>=1.17.3' && \ +RUN ENVS_LIST=('pytorch-cpu' 'pytorch-gpu' 'tensorflow-cpu' 'tensorflow-gpu') && \ + for i in "${!ENVS_LIST[@]}"; do \ + CONDA_ENV="${ENVS_LIST[i]}" && \ + conda install -yn "$CONDA_ENV" \ + "neural-compressor=${NEURAL_COMPRESSOR_VERSION}" \ + 'scikit-learn>=1.5.0' \ + ; \ + done && \ conda clean -y --all -RUN conda run -n tensorflow-gpu python -m pip install --no-deps --no-cache-dir \ - 'tf2onnx>=1.16.1' \ - 'onnxruntime>=1.17.3' && \ +RUN ENVS_LIST=('tensorflow-cpu' 'tensorflow-gpu') && \ + for i in "${!ENVS_LIST[@]}"; do \ + CONDA_ENV="${ENVS_LIST[i]}" && \ + conda run -n "$CONDA_ENV" python -m pip install --no-deps --no-cache-dir \ + 'tf2onnx==1.16.1' \ + 'onnxruntime==1.18.1' \ + ; \ + done && \ conda clean -y --all COPY --chown=dev notebooks /home/dev/jupyter diff --git a/preset/inference-optimization/docker-compose.yaml b/preset/inference-optimization/docker-compose.yaml index ac8ebc074..cf543bff5 100644 --- a/preset/inference-optimization/docker-compose.yaml +++ b/preset/inference-optimization/docker-compose.yaml @@ -15,6 +15,7 @@ # -*- coding: utf-8 -*- # + version: '3' services: dl-base: @@ -22,42 +23,42 @@ services: args: BASE_IMAGE: ${BASE_IMAGE:-ubuntu} BASE_TAG: ${BASE_TAG:-22.04} - DEEPSPEED_VERSION: ${DEEPSPEED_VERSION:-0.14.0} DEVICE: ${DEVICE:-flex} - DPNP_VERSION: ${NUMBA_DPEX_VERSION:-0.14.0} - HOROVOD_VERSION: ${HOROVOD_VERSION:-0.28.1.4} - ICD_VER: 23.43.27642.40-803~22.04 - IDP_VERSION: ${IDP_VERSION:-2024.1.0} - IMPI_VERSION: ${IMPI_VERSION:-2021.12} + DPNP_VERSION: ${DPNP_VERSION:-0.15.0} + HOROVOD_VERSION: ${HOROVOD_VERSION:-0.28.1.5} + ICD_VER: 23.43.27642.52-803~22.04 + IDP_VERSION: ${IDP_VERSION:-2024.2} + IMPI_VERSION: ${IMPI_VERSION:-2021.13} INTEL_CHANNEL: ${INTEL_CHANNEL:-https://software.repos.intel.com/python/conda/} - IPEX_CPU_VERSION: ${IPEX_CPU_VERSION:-2.2.0=*cpu*} - IPEX_GPU_VERSION: ${IPEX_GPU_VERSION:-2.1.20=*xpu*} - ITEX_VERSION: ${ITEX_VERSION:-2.15} + IPEX_CPU_VERSION: ${IPEX_CPU_VERSION:-2.3.100} + IPEX_XPU_VERSION: ${IPEX_XPU_VERSION:-2.1.40} + ITEX_CPU_VERSION: ${ITEX_CPU_VERSION:-2.15.0} + ITEX_XPU_VERSION: ${ITEX_XPU_VERSION:-2.15.0.1} LEVEL_ZERO_DEV_VER: 1.14.0-744~22.04 - LEVEL_ZERO_GPU_VER: 1.3.27642.40-803~22.04 + LEVEL_ZERO_GPU_VER: 1.3.27642.52-803~22.04 LEVEL_ZERO_VER: 1.14.0-744~22.04 - MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Linux-x86_64} - MPI_VERSION: ${MPI_VERSION:-2021.12.0} - NEURAL_COMPRESSOR_VERSION: ${NEURAL_COMPRESSOR_VERSION:-2.4.1} - NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.22.1} + MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Miniforge3-Linux-x86_64} + MPI_VERSION: ${MPI_VERSION:-2021.13} + NEURAL_COMPRESSOR_VERSION: ${NEURAL_COMPRESSOR_VERSION:-2.5.1} + NUMBA_DPEX_VERSION: ${NUMBA_DPEX_VERSION:-0.23.0} NUMPY_VERSION: ${NUMPY_VERSION:-1.26.4} - ONECCL_CPU_VERSION: ${ONECCL_CPU_VERSION:-2.2.0=*cpu*} - ONECCL_GPU_VERSION: ${ONECCL_GPU_VERSION:-2.1.200=*xpu*} - PYTHON_VERSION: ${PYTHON_VERSION:-3.10} - TF_VERSION: ${TF_VERSION:-2.15} - TORCHAUDIO_CPU_VERSION: ${TORCHAUDIO_CPU_VERSION:-2.2.0=*cpu*} - TORCHAUDIO_GPU_VERSION: ${TORCHAUDIO_GPU_VERSION:-2.1.0=*xpu*} - TORCHVISION_CPU_VERSION: ${TORCHVISION_CPU_VERSION:-0.17=*cpu*} - TORCHVISION_GPU_VERSION: ${TORCHVISION_GPU_VERSION:-0.16.0=*xpu*} - TORCH_CPU_VERSION: ${TORCH_CPU_VERSION:-2.2.0=*cpu*} - TORCH_GPU_VERSION: ${TORCH_GPU_VERSION:-2.1.0=*xpu*} + ONECCL_CPU_VERSION: ${ONECCL_CPU_VERSION:-2.3.0} + ONECCL_XPU_VERSION: ${ONECCL_XPU_VERSION:-2.1.400} + PYTHON_VERSION: ${PYTHON_VERSION:-3.9} + TF_VERSION: ${TF_VERSION:-2.15.1} + TORCHAUDIO_CPU_VERSION: ${TORCHAUDIO_CPU_VERSION:-2.3.1} + TORCHAUDIO_XPU_VERSION: ${TORCHAUDIO_XPU_VERSION:-2.1.0} + TORCHVISION_CPU_VERSION: ${TORCHVISION_CPU_VERSION:-0.18.1} + TORCHVISION_XPU_VERSION: ${TORCHVISION_XPU_VERSION:-0.16.0} + TORCH_CPU_VERSION: ${TORCH_CPU_VERSION:-2.3.1} + TORCH_XPU_VERSION: ${TORCH_XPU_VERSION:-2.1.0} http_proxy: ${http_proxy} https_proxy: ${https_proxy} no_proxy: '' context: ../deep-learning labels: docs: false - target: deep-learning-jupyter + target: deep-learning-base environment: http_proxy: ${http_proxy} https_proxy: ${https_proxy} @@ -65,9 +66,12 @@ services: shm_size: 12GB volumes: - /dev/dri/by-path:/dev/dri/by-path - command: | - bash -c "conda run -n pytorch-cpu python -c 'import torch;print(torch.__version__);import intel_extension_for_pytorch as ipex;print(ipex.__version__);' && \ - conda run -n tensorflow-cpu python -c 'import tensorflow as tf; print(tf.__version__)'" + command: > + bash -c " conda run -n pytorch-cpu python -c 'import torch;print(torch.__version__);import + intel_extension_for_pytorch as ipex;print(ipex.__version__)' && + + conda run -n tensorflow-cpu python -c 'import tensorflow as tf;print(tf.__version__)' + " inference-optimization: @@ -75,13 +79,14 @@ services: args: COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME:-preset} context: . + target: inference-optimization labels: docs: inference_optimization org.opencontainers.image.title: "Intel® AI Tools Selector Preset Containers - Inference Optimization" org.opencontainers.base.name: "intel/deep-learning" org.opencontainers.image.name: "intel/inference-optimization" - org.opencontainers.image.version: 2024.1.0-py${PYTHON_VERSION:-3.10} - dependency.python: ${PYTHON_VERSION:-3.10} + org.opencontainers.image.version: 2024.2.0-py${PYTHON_VERSION:-3.9} + dependency.python: ${PYTHON_VERSION:-3.9} dependency.python.pip: requirements.txt dependency.apt.apt-utils: true dependency.apt.build-essential: true @@ -98,11 +103,11 @@ services: dependency.apt.gzip: true dependency.apt.hwinfo: true dependency.apt.intel-igc-cm: true - dependency.apt.intel-level-zero-gpu: '1.3.27642.40-803~22.04' + dependency.apt.intel-level-zero-gpu: true dependency.apt.intel-media-va-driver-non-free: true - dependency.apt.intel-opencl-icd: '23.43.27642.40-803~22.04' - dependency.apt.level-zero: '1.14.0-744~22.04' - dependency.apt.level-zero-dev: '1.14.0-744~22.04' + dependency.apt.intel-opencl-icd: true + dependency.apt.level-zero: true + dependency.apt.level-zero-dev: true dependency.apt.libegl1-mesa: true dependency.apt.libegl1-mesa-dev: true dependency.apt.libegl-mesa0: true @@ -120,7 +125,6 @@ services: dependency.apt.libmfxgen1: true dependency.apt.libopenmpi-dev: true dependency.apt.libvpl2: true - dependency.apt.libxatracker2: true dependency.apt.make: true dependency.apt.mesa-va-drivers: true dependency.apt.mesa-vdpau-drivers: true @@ -138,68 +142,72 @@ services: dependency.apt.vainfo: true dependency.apt.wget: true dependency.apt.xz-utils: true - dependency.conda.jupyterlab: '>=4.1.8' - dependency.conda.aiohttp: '>=3.9.0' - dependency.conda.cryptography: '>=42.0.4' - dependency.conda.dataset_librarian: '>=1.0.4' - dependency.conda.deepspeed: '>=0.14.0' - dependency.conda.dpcpp_impl_linux-64: '>=2024.1.' - dependency.conda.dpcpp-cpp-rt: '>=2024.1.' - dependency.conda.dpnp: '>=0.14.0' - dependency.conda.idna: '>=3.7' - dependency.conda.impi-devel: '>=2021.12' - dependency.conda.intel-extension-for-pytorch_cpu: '>=2.2.0=*cpu*' - dependency.conda.intel-extension-for-pytorch_gpu: '>=2.1.20=*xpu*' - dependency.conda.intel-extension-for-tensorflow_cpu: '>=2.15=*cpu*' - dependency.conda.intel-extension-for-tensorflow_gpu: '>=2.15=*xpu*' - dependency.conda.intel-openmp: '>=2024.1.0' - dependency.conda.intel-optimization-for-horovod: '>=0.28.1.4' - dependency.conda.ipykernel: '>=6.29.3' - dependency.conda.ipython: '>=8.18.1' - dependency.conda.jinja2: '>=3.1.3' - dependency.conda.jupyterhub: '>=4.1.5' - dependency.conda.jupyter-server-proxy: '>=4.1.2' - dependency.conda.kernda: '>=0.3.0' - dependency.conda.mako: '>=1.2.2' - dependency.conda.matplotlib-base: '>=3.4.3' - dependency.conda.mkl-dpcpp: '>=2024.1.0' - dependency.conda.neural-compressor: '>=2.4.1' - dependency.conda.nodejs: '>=20.12.2' - dependency.conda.notebook: '>=7.1.3' - dependency.conda.numpy: '>=1.26.4' - dependency.conda.oauthlib: '>=3.2.2' - dependency.conda.oneccl_bind_pt_cpu: '>=2.2.0=*cpu*' - dependency.conda.oneccl_bind_pt_gpu: '>=2.1.200=*xpu*' + dependency.conda.accelerate: '==0.32.1' + dependency.conda.colorama: '==0.4.6' + dependency.conda.conda: '==24.5.0' + dependency.conda.dpnp: '=0.15.0' + dependency.conda.intel-extension-for-pytorch_cpu: '=2.3.100' + dependency.conda.intel-extension-for-pytorch_xpu: '=2.1.40' + dependency.conda.intel-extension-for-tensorflow_cpu: '=2.15.0=*cpu*' + dependency.conda.intel-extension-for-tensorflow_xpu: '=2.15.0.1=*xpu*' + dependency.conda.intel-optimization-for-horovod: '=0.28.1.5' + dependency.conda.ipykernel: '==6.29.5' + dependency.conda.jupyterhub: '==5.1.0' + dependency.conda.jupyter-server-proxy: '==4.3.0' + dependency.conda.kernda: '==0.3.0' + dependency.conda.ld_impl_linux-64: '==2.40' + dependency.conda.mamba: '==1.5.8' + dependency.conda.matplotlib-base: '>=3.8.4' + dependency.conda.mpi: '==1.0' + dependency.conda.mpich: '==4.2.2' + dependency.conda.networkx: '==3.3' + dependency.conda.neural-compressor: '=2.5.1' + dependency.conda.notebook: '==7.2.1' + dependency.conda.oneccl_bind_pt_cpu: '=2.3.0' + dependency.conda.oneccl_bind_pt_xpu: '=2.1.400' dependency.conda.onnx: '>=1.14.1' - dependency.conda.packaging: '>=23.2' - dependency.conda.pandas: '>=2.2.2' - dependency.conda.pillow: '>=10.2.0' - dependency.conda.protobuf: '>=4.24' - dependency.conda.pyjwt: '>=2.4.0' - dependency.conda.python: "=${PYTHON_VERSION:-3.10}" - dependency.conda.pytorch_cpu: '>=2.2.0=*cpu*' - dependency.conda.pytorch_gpu: '>=2.1.0=*xpu*' - dependency.conda.setuptools: '>=69.1.0' - dependency.conda.tensorboardx: '>=2.6.2.2' - dependency.conda.tensorflow: '>=2.15' - dependency.conda.torchaudio_cpu: '>=2.2.0=*cpu*' - dependency.conda.torchaudio_gpu: '>=2.1.0=*xpu*' - dependency.conda.torchvision_cpu: '>=0.17=*cpu*' - dependency.conda.torchvision_gpu: '>=0.16.0=*xpu*' - dependency.conda.tornado: '>=6.3.3' - dependency.conda.tqdm: '>=4.66.2' - dependency.conda.werkzeug: '>=2.2.3' - target: inference-optimization + dependency.conda.onnxruntime: '==1.18.1' + dependency.conda.py-cpuinfo: '==9.0.0' + dependency.conda.python: '==3.10.14' + dependency.conda.pytorch_cpu: '=2.3.1' + dependency.conda.pytorch_xpu: '=2.1.0' + dependency.conda.scikit-learn: '>=1.5.0' + dependency.conda.tensorboardx: '==2.6.2.2' + dependency.conda.tensorflow: '=2.15.1' + dependency.conda.tensorflow-hub: '==0.16.1' + dependency.conda.tf2onnx: '==1.16.1' + dependency.conda.torchaudio_cpu: '=2.3.1' + dependency.conda.torchaudio_xpu: '=2.1.0' + dependency.conda.torchvision_cpu: '=0.18.1' + dependency.conda.torchvision_xpu: '=0.16.0' + dependency.conda.tqdm: '==4.66.4' depends_on: - dl-base extends: dl-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-2024.1.0-py${PYTHON_VERSION:-3.10} - command: | - bash -c "conda run -n pytorch-cpu python -c 'import intel_extension_for_pytorch as ipex;print(ipex.__version__);' && \ - conda run -n pytorch-cpu python -c 'import neural_compressor;print(\"Neural Compressor Version:\", neural_compressor.__version__)' && \ - conda run -n pytorch-gpu python -c 'import torch;print(torch.device(\"xpu\"));import intel_extension_for_pytorch as ipex;print(ipex.xpu.is_available());' && \ - conda run -n pytorch-gpu python -c 'import neural_compressor;print(\"Neural Compressor Version:\", neural_compressor.__version__)' && \ - conda run -n tensorflow-cpu python -c 'import intel_extension_for_tensorflow as itex;print(itex.__version__);' && \ - conda run -n tensorflow-cpu python -c 'import neural_compressor, tf2onnx; print(\"\\nNeural Compressor Version:\", neural_compressor.__version__, \"\\\nTensorFlow2ONNX Version:\", tf2onnx.__version__)' && \ - conda run -n tensorflow-gpu python -c 'from tensorflow.python.client import device_lib; print(device_lib.list_local_devices())' && \ - conda run -n tensorflow-gpu python -c 'import neural_compressor, tf2onnx; print(\"\\nNeural Compressor Version:\", neural_compressor.__version__, \"\\\nTensorFlow2ONNX Version:\", tf2onnx.__version__)'" + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + command: > + bash -c "conda run -n pytorch-cpu python -c 'import intel_extension_for_pytorch + as ipex;print(ipex.__version__)' && + + conda run -n pytorch-cpu python -c 'import neural_compressor;print(\"Neural + Compressor Version:\", neural_compressor.__version__)' && + + conda run -n pytorch-gpu python -c 'import torch;print(torch.device(\"xpu\"));import + intel_extension_for_pytorch as ipex;print(ipex.xpu.is_available())' && + + conda run -n pytorch-gpu python -c 'import neural_compressor;print(\"Neural + Compressor Version:\", neural_compressor.__version__)' && + + conda run -n tensorflow-cpu python -c 'import intel_extension_for_tensorflow + as itex;print(itex.__version__)' && + + conda run -n tensorflow-cpu python -c 'import neural_compressor, tf2onnx;print(\"\nNeural + Compressor Version:\", neural_compressor.__version__)';print(\"\nTensorFlow2ONNX + Version:\", tf2onnx.__version__)' && + + conda run -n tensorflow-gpu python -c 'from tensorflow.python.client import + device_lib;print(device_lib.list_local_devices())' && + + conda run -n tensorflow-gpu python -c 'import neural_compressor, tf2onnx;print(\"\\nNeural + Compressor Version:\", neural_compressor.__version__)';print(\"\\TensorFlow2ONNX + Version:\", tf2onnx.__version__)' " diff --git a/preset/inference-optimization/requirements.txt b/preset/inference-optimization/requirements.txt index 15dad7740..8f0091ace 100644 --- a/preset/inference-optimization/requirements.txt +++ b/preset/inference-optimization/requirements.txt @@ -1,16 +1,5 @@ -accelerate>=0.30.0 -cloud-data-connector>=1.0.3 -cryptography>=42.0.7 -dataset-librarian>=1.0.4 -datasets>=2.19.1 -evaluate>=0.4.2 +dataset-librarian==1.0.4 +evaluate==0.4.2 git+https://github.com/huggingface/optimum-intel.git -ninja>=1.11.1.1 -onnxruntime>=1.17.3 -py-cpuinfo>=9.0.0 -python-dotenv>=1.0.1 -requests>=2.31.0 -tensorflow-hub>=0.16.1 -tf2onnx>==1.16.1 -tqdm>=4.66.2 -transformers>=4.40.2 +tf2onnx==1.16.1 +onnxruntime==1.18.1 diff --git a/preset/inference-optimization/tests.yaml b/preset/inference-optimization/tests.yaml index 987310673..a906ecde3 100644 --- a/preset/inference-optimization/tests.yaml +++ b/preset/inference-optimization/tests.yaml @@ -12,78 +12,87 @@ # See the License for the specific language governing permissions and # limitations under the License. +--- inference-optimization-inc-ipex-quantization-notebook-${PYTHON_VERSION:-3.9}-cpu: cmd: papermill --log-output jupyter/inc-ipex-quantization/quantize_with_inc.ipynb result.ipynb -k pytorch-cpu --cwd jupyter/inc-ipex-quantization - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True inference-optimization-inc-ipex-quantization-notebook-${PYTHON_VERSION:-3.9}-gpu: cmd: papermill --log-output jupyter/inc-ipex-quantization/quantize_with_inc.ipynb result.ipynb -k pytorch-gpu --cwd jupyter/inc-ipex-quantization - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True + device: ["/dev/dri"] inference-optimization-inc-itex-notebook-${PYTHON_VERSION:-3.9}-cpu: cmd: papermill --log-output jupyter/inc-itex/inc_sample_tensorflow.ipynb result.ipynb -k tensorflow-cpu --cwd jupyter/inc-itex - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True # Status: Commented due to out of resources error # inference-optimization-inc-itex-notebook-${PYTHON_VERSION:-3.9}-gpu: # cmd: papermill --log-output jupyter/inc-itex/inc_sample_tensorflow.ipynb result.ipynb -k tensorflow-gpu --cwd jupyter/inc-itex -# img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} +# img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} # notebook: True inference-optimization-inc-tensorflow-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n tensorflow-cpu sample-tests/neural_compressor/tensorflow/run.sh cpu - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-inc-tensorflow-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n tensorflow-gpu sample-tests/neural_compressor/tensorflow/run.sh gpu - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] inference-optimization-inc-torch-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n pytorch-cpu sample-tests/neural_compressor/torch/run.sh cpu - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-ipex-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n pytorch-cpu python -W ignore sample-tests/intel_extension_for_pytorch/test_ipex.py --device cpu --ipex - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-ipex-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n pytorch-gpu python -W ignore sample-tests/intel_extension_for_pytorch/test_ipex.py --device xpu --ipex - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] inference-optimization-itex-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n tensorflow-cpu python -W ignore sample-tests/intel_extension_for_tensorflow/test_itex.py - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-itex-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n tensorflow-gpu python -W ignore sample-tests/intel_extension_for_tensorflow/test_itex.py - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] inference-optimization-itex-inference-notebook-${PYTHON_VERSION:-3.9}-cpu: cmd: papermill --log-output jupyter/itex-inference/tutorial_optimize_TensorFlow_pretrained_model.ipynb result.ipynb -k tensorflow-cpu --cwd jupyter/itex-inference - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} notebook: True # Need update from TensorFlow v1 to V2 # inference-optimization-itex-inference-notebook-${PYTHON_VERSION:-3.9}-gpu: # cmd: papermill --log-output jupyter/itex-inference/tutorial_optimize_TensorFlow_pretrained_model.ipynb result.ipynb -k tensorflow-gpu --cwd jupyter/itex-inference -# img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} +# img: ${REGISTRY}/aiops/mlops-ci:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} # notebook: True inference-optimization-onnx-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n tensorflow-cpu sample-tests/onnx/run.sh - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-onnx-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n tensorflow-gpu sample-tests/onnx/run.sh - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] inference-optimization-tensorflow-dataset-librarian-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n tensorflow-cpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-tensorflow-dataset-librarian-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n tensorflow-gpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] inference-optimization-torch-dataset-librarian-${PYTHON_VERSION:-3.9}-cpu: cmd: conda run -n pytorch-cpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} inference-optimization-torch-dataset-librarian-${PYTHON_VERSION:-3.9}-gpu: cmd: conda run -n pytorch-gpu bash -c 'yes | python -m dataset_librarian.dataset -n msmarco --download -d ~/msmarco' - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.1.0}-py${PYTHON_VERSION:-3.9} + img: amr-registry.caas.intel.com/aiops/aikit-products-dev:b-${GITHUB_RUN_NUMBER:-0}-inference-optimization-${RELEASE:-2024.2.0}-py${PYTHON_VERSION:-3.9} + device: ["/dev/dri"] diff --git a/python/requirements.txt b/python/requirements.txt index 0418b1648..fa2002baf 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,6 +1,6 @@ numpy==1.26.4 setuptools>=70.0.0 psutil==6.0.0 -mkl==2024.2.0 -mkl-include==2024.2.0 -intel-openmp==2024.2.0 +mkl==2024.2.1 +mkl-include==2024.2.1 +intel-openmp==2024.2.1 diff --git a/pytorch/Dockerfile b/pytorch/Dockerfile index 809da9c8b..1a5b497d0 100644 --- a/pytorch/Dockerfile +++ b/pytorch/Dockerfile @@ -36,11 +36,6 @@ ARG PYTHON_VERSION ARG PYTHON_BASE=${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER}-${BASE_IMAGE_NAME}-${BASE_IMAGE_TAG}-${PACKAGE_OPTION}-py${PYTHON_VERSION}-base FROM ${PYTHON_BASE} AS ipex-base-pip -ARG IPEX_VERSION -ARG PYTORCH_VERSION -ARG TORCHAUDIO_VERSION -ARG TORCHVISION_VERSION - WORKDIR / COPY requirements.txt . @@ -49,11 +44,6 @@ RUN python -m pip install --no-cache-dir -r requirements.txt && \ FROM ${PYTHON_BASE} AS ipex-base-idp -ARG IPEX_VERSION -ARG PYTORCH_VERSION -ARG TORCHAUDIO_VERSION -ARG TORCHVISION_VERSION - WORKDIR / COPY requirements.txt . @@ -158,8 +148,8 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ - gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg -RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | \ + gpg --dearmor --yes --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ tee /etc/apt/sources.list.d/intel-gpu-jammy.list ARG ICD_VER @@ -171,8 +161,8 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends --fix-missing \ intel-opencl-icd=${ICD_VER} \ intel-level-zero-gpu=${LEVEL_ZERO_GPU_VER} \ - level-zero=${LEVEL_ZERO_VER} \ - level-zero-dev=${LEVEL_ZERO_DEV_VER} && \ + libze1=${LEVEL_ZERO_VER} \ + libze-dev=${LEVEL_ZERO_DEV_VER} && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -194,7 +184,8 @@ RUN apt-get update && \ WORKDIR / COPY xpu-requirements.txt . -RUN python -m pip install --no-cache-dir -r xpu-requirements.txt +RUN python -m pip install --no-cache-dir -r xpu-requirements.txt && \ + rm -rf xpu-requirements.txt /etc/apt/sources.list.d/intel-gpu-jammy.list /etc/apt/sources.list.d/oneAPI.list ENV LD_LIBRARY_PATH=/opt/intel/oneapi/redist/lib:$LD_LIBRARY_PATH diff --git a/pytorch/README.md b/pytorch/README.md index c2302f783..53adcb1d8 100644 --- a/pytorch/README.md +++ b/pytorch/README.md @@ -24,6 +24,7 @@ The images below include support for both CPU and GPU optimizations: | Tag(s) | Pytorch | IPEX | Driver | Dockerfile | | ---------------------- | -------- | -------------- | ------ | --------------- | +| `2.1.40-xpu` | [v2.1.0] | [v2.1.40+xpu] | [914] | [v0.4.0-Beta] | | `2.1.30-xpu` | [v2.1.0] | [v2.1.30+xpu] | [803] | [v0.4.0-Beta] | | `2.1.20-xpu` | [v2.1.0] | [v2.1.20+xpu] | [803] | [v0.3.4] | | `2.1.10-xpu` | [v2.1.0] | [v2.1.10+xpu] | [736] | [v0.2.3] | @@ -36,7 +37,7 @@ docker run -it --rm \ --device /dev/dri \ -v /dev/dri/by-path:/dev/dri/by-path \ --ipc=host \ - intel/intel-extension-for-pytorch:2.1.30-xpu + intel/intel-extension-for-pytorch:2.1.40-xpu ``` --- @@ -45,8 +46,9 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | Pytorch | IPEX | Driver | Jupyter Port | Dockerfile | | --------------------- | -------- | ------------- | ------ | ------------ | --------------- | -| `2.1.20-xpu-pip-jupyter` | [v2.1.0] | [v2.1.20+xpu] | [803] | `8888` | [v0.3.4] | -| `2.1.10-xpu-pip-jupyter` | [v2.1.0] | [v2.1.10+xpu] | [736] | `8888` | [v0.2.3] | +| `2.1.40-xpu-pip-jupyter` | [v2.1.0] | [v2.1.40+xpu] | [914] | `8888` | [v0.4.0-Beta] | +| `2.1.20-xpu-pip-jupyter` | [v2.1.0] | [v2.1.20+xpu] | [803] | `8888` | [v0.3.4] | +| `2.1.10-xpu-pip-jupyter` | [v2.1.0] | [v2.1.10+xpu] | [736] | `8888` | [v0.2.3] | ### Run the XPU Jupyter Container @@ -55,7 +57,7 @@ docker run -it --rm \ -p 8888:8888 \ --device /dev/dri \ -v /dev/dri/by-path:/dev/dri/by-path \ - intel/intel-extension-for-pytorch:2.1.20-xpu-pip-jupyter + intel/intel-extension-for-pytorch:2.1.40-xpu-pip-jupyter ``` After running the command above, copy the URL (something like `http://127.0.0.1:$PORT/?token=***`) into your browser to access the notebook server. @@ -66,7 +68,8 @@ The images below are built only with CPU optimizations (GPU acceleration support | Tag(s) | Pytorch | IPEX | Dockerfile | | -------------------------- | -------- | ------------ | --------------- | -| `2.3.0-pip-base`, `latest` | [v2.3.0] | [v2.3.0+cpu] | [v0.4.0-Beta] | +| `2.4.0-pip-base`, `latest` | [v2.4.0] | [v2.4.0+cpu] | [v0.4.0-Beta] | +| `2.3.0-pip-base` | [v2.3.0] | [v2.3.0+cpu] | [v0.4.0-Beta] | | `2.2.0-pip-base` | [v2.2.0] | [v2.2.0+cpu] | [v0.3.4] | | `2.1.0-pip-base` | [v2.1.0] | [v2.1.0+cpu] | [v0.2.3] | | `2.0.0-pip-base` | [v2.0.0] | [v2.0.0+cpu] | [v0.1.0] | @@ -83,6 +86,7 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | Pytorch | IPEX | Dockerfile | | ------------------- | -------- | ------------ | --------------- | +| `2.4.0-pip-jupyter` | [v2.4.0] | [v2.4.0+cpu] | [v0.4.0-Beta] | | `2.3.0-pip-jupyter` | [v2.3.0] | [v2.3.0+cpu] | [v0.4.0-Beta] | | `2.2.0-pip-jupyter` | [v2.2.0] | [v2.2.0+cpu] | [v0.3.4] | | `2.1.0-pip-jupyter` | [v2.1.0] | [v2.1.0+cpu] | [v0.2.3] | @@ -93,7 +97,7 @@ docker run -it --rm \ -p 8888:8888 \ -v $PWD/workspace:/workspace \ -w /workspace \ - intel/intel-extension-for-pytorch:2.3.0-pip-jupyter + intel/intel-extension-for-pytorch:2.4.0-pip-jupyter ``` After running the command above, copy the URL (something like `http://127.0.0.1:$PORT/?token=***`) into your browser to access the notebook server. @@ -104,6 +108,7 @@ The images below additionally include [Intel® oneAPI Collective Communications | Tag(s) | Pytorch | IPEX | oneCCL | INC | Dockerfile | | --------------------- | -------- | ------------ | -------------------- | --------- | -------------- | +| `2.4.0-pip-multinode` | [v2.4.0] | [v2.4.0+cpu] | [v2.4.0][ccl-v2.4.0] | [v3.0] | [v0.4.0-Beta] | | `2.3.0-pip-multinode` | [v2.3.0] | [v2.3.0+cpu] | [v2.3.0][ccl-v2.3.0] | [v2.6] | [v0.4.0-Beta] | | `2.2.0-pip-multinode` | [v2.2.2] | [v2.2.0+cpu] | [v2.2.0][ccl-v2.2.0] | [v2.6] | [v0.4.0-Beta] | | `2.1.100-pip-mulitnode` | [v2.1.2] | [v2.1.100+cpu] | [v2.1.0][ccl-v2.1.0] | [v2.6] | [v0.4.0-Beta] | @@ -186,7 +191,7 @@ To add these files correctly please follow the steps described below. -v $PWD/authorized_keys:/etc/ssh/authorized_keys \ -v $PWD/tests:/workspace/tests \ -w /workspace \ - intel/intel-extension-for-pytorch:2.3.0-pip-multinode \ + intel/intel-extension-for-pytorch:2.4.0-pip-multinode \ bash -c '/usr/sbin/sshd -D' ``` @@ -199,7 +204,7 @@ To add these files correctly please follow the steps described below. -v $PWD/tests:/workspace/tests \ -v $PWD/hostfile:/workspace/hostfile \ -w /workspace \ - intel/intel-extension-for-pytorch:2.3.0-pip-multinode \ + intel/intel-extension-for-pytorch:2.4.0-pip-multinode \ bash -c 'ipexrun cpu --nnodes 2 --nprocs-per-node 1 --master-addr 127.0.0.1 --master-port 3022 /workspace/tests/ipex-resnet50.py --ipex --device cpu --backend ccl' ``` @@ -227,7 +232,7 @@ Additionally, if you have a [DeepSpeed* configuration](https://www.deepspeed.ai/ -v $PWD/hostfile:/workspace/hostfile \ -v $PWD/ds_config.json:/workspace/ds_config.json \ -w /workspace \ - intel/intel-extension-for-pytorch:2.3.0-pip-multinode \ + intel/intel-extension-for-pytorch:2.4.0-pip-multinode \ bash -c 'deepspeed --launcher IMPI \ --master_addr 127.0.0.1 --master_port 3022 \ --deepspeed_config ds_config.json --hostfile /workspace/hostfile \ @@ -240,9 +245,9 @@ Additionally, if you have a [DeepSpeed* configuration](https://www.deepspeed.ai/ The image below is an extension of the IPEX Multi-Node Container designed to run Hugging Face Generative AI scripts. The container has the typical installations needed to run and fine tune PyTorch generative text models from Hugging Face. It can be used to run multinode jobs using the same instructions from the [IPEX Multi-Node container](#setup-and-run-ipex-multi-node-container). -| Tag(s) | Pytorch | IPEX | oneCCL | transformers | Dockerfile | -| --------------------- | -------- | ------------ | -------------------- | --------- | --------------- | -| `2.3.0-pip-multinode-hf-4.41.2-genai` | [v2.3.1](https://github.com/pytorch/pytorch/releases/tag/v2.3.1) | [v2.3.0+cpu] | [v2.3.0][ccl-v2.3.0] | [v4.41.2] | [v0.4.0-Beta] | +| Tag(s) | Pytorch | IPEX | oneCCL | HF Transformers | Dockerfile | +| ------------------------------------- | -------- | ------------ | -------------------- | --------------- | --------------- | +| `2.4.0-pip-multinode-hf-4.44.0-genai` | [v2.4.0] | [v2.4.0+cpu] | [v2.4.0][ccl-v2.4.0] | [v4.44.0] | [v0.4.0-Beta] | Below is an example that shows single node job with the existing [`finetune.py`](../workflows/charts/huggingface-llm/scripts/finetune.py) script. @@ -251,7 +256,7 @@ Below is an example that shows single node job with the existing [`finetune.py`] docker run -it \ -v $PWD/workflows/charts/huggingface-llm/scripts:/workspace/scripts \ -w /workspace/scripts \ - intel/intel-extension-for-pytorch:2.3.0-pip-multinode-hf-4.41.2-genai \ + intel/intel-extension-for-pytorch:2.4.0-pip-multinode-hf-4.44.0-genai \ bash -c 'python finetune.py ' ``` @@ -261,6 +266,7 @@ The images below are [TorchServe*] with CPU Optimizations: | Tag(s) | Pytorch | IPEX | Dockerfile | | ------------------- | -------- | ------------ | --------------- | +| `2.4.0-serving-cpu` | [v2.4.0] | [v2.4.0+cpu] | [v0.4.0-Beta] | | `2.3.0-serving-cpu` | [v2.3.0] | [v2.3.0+cpu] | [v0.4.0-Beta] | | `2.2.0-serving-cpu` | [v2.2.0] | [v2.2.0+cpu] | [v0.3.4] | @@ -272,6 +278,7 @@ The images below are built only with CPU optimizations (GPU acceleration support | Tag(s) | Pytorch | IPEX | Dockerfile | | ---------------- | -------- | ------------ | --------------- | +| `2.4.0-idp-base` | [v2.4.0] | [v2.4.0+cpu] | [v0.4.0-Beta] | | `2.3.0-idp-base` | [v2.3.0] | [v2.3.0+cpu] | [v0.4.0-Beta] | | `2.2.0-idp-base` | [v2.2.0] | [v2.2.0+cpu] | [v0.3.4] | | `2.1.0-idp-base` | [v2.1.0] | [v2.1.0+cpu] | [v0.2.3] | @@ -281,6 +288,7 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | Pytorch | IPEX | Dockerfile | | ------------------- | -------- | ------------ | --------------- | +| `2.4.0-idp-jupyter` | [v2.4.0] | [v2.4.0+cpu] | [v0.4.0-Beta] | | `2.3.0-idp-jupyter` | [v2.3.0] | [v2.3.0+cpu] | [v0.4.0-Beta] | | `2.2.0-idp-jupyter` | [v2.2.0] | [v2.2.0+cpu] | [v0.3.4] | | `2.1.0-idp-jupyter` | [v2.1.0] | [v2.1.0+cpu] | [v0.2.3] | @@ -290,6 +298,7 @@ The images below additionally include [Intel® oneAPI Collective Communications | Tag(s) | Pytorch | IPEX | oneCCL | INC | Dockerfile | | --------------------- | -------- | ------------ | -------------------- | --------- | --------------- | +| `2.4.0-idp-multinode` | [v2.4.0] | [v2.4.0+cpu] | [v2.4.0][ccl-v2.3.0] | [v3.0] | [v0.4.0-Beta] | | `2.3.0-idp-multinode` | [v2.3.0] | [v2.3.0+cpu] | [v2.3.0][ccl-v2.3.0] | [v2.6] | [v0.4.0-Beta] | | `2.2.0-idp-multinode` | [v2.2.0] | [v2.2.0+cpu] | [v2.2.0][ccl-v2.2.0] | [v2.4.1] | [v0.3.4] | | `2.1.0-idp-mulitnode` | [v2.1.0] | [v2.1.0+cpu] | [v2.1.0][ccl-v2.1.0] | [v2.3.1] | [v0.2.3] | @@ -301,6 +310,7 @@ The images below are built only with CPU and GPU optimizations and include [Inte | Tag(s) | Pytorch | IPEX | Driver | Dockerfile | | ---------------- | -------- | ------------ | -------- | ------ | +| `2.1.40-xpu-idp-base` | [v2.1.0] | [v2.1.40+xpu] | [914] | [v0.4.0-Beta] | | `2.1.30-xpu-idp-base` | [v2.1.0] | [v2.1.30+xpu] | [803] | [v0.4.0-Beta] | | `2.1.10-xpu-idp-base` | [v2.1.0] | [v2.1.10+xpu] | [736] | [v0.2.3] | @@ -308,8 +318,9 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | Pytorch | IPEX | Driver | Jupyter Port | Dockerfile | | --------------------- | -------- | ------------- | ------ | ------------ | --------------- | -| `2.1.20-xpu-idp-jupyter` | [v2.1.0] | [v2.1.20+xpu] | [803] | `8888` | [v0.3.4] | -| `2.1.10-xpu-idp-jupyter` | [v2.1.0] | [v2.1.10+xpu] | [736] | `8888` | [v0.2.3] | +| `2.1.40-xpu-idp-jupyter` | [v2.1.0] | [v2.1.40+xpu] | [914] | `8888` | [v0.4.0-Beta] | +| `2.1.20-xpu-idp-jupyter` | [v2.1.0] | [v2.1.20+xpu] | [803] | `8888` | [v0.3.4] | +| `2.1.10-xpu-idp-jupyter` | [v2.1.0] | [v2.1.10+xpu] | [736] | `8888` | [v0.2.3] | ## Build from Source @@ -375,11 +386,13 @@ It is the image user's responsibility to ensure that any use of The images below [v0.2.3]: https://github.com/intel/ai-containers/blob/v0.2.3/pytorch/Dockerfile [v0.1.0]: https://github.com/intel/ai-containers/blob/v0.1.0/pytorch/Dockerfile +[v2.1.40+xpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.1.40%2Bxpu [v2.1.30+xpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.1.30%2Bxpu [v2.1.20+xpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.1.20%2Bxpu [v2.1.10+xpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.1.10%2Bxpu [v2.0.110+xpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.0.110%2Bxpu +[v2.4.0]: https://github.com/pytorch/pytorch/releases/tag/v2.4.0 [v2.3.0]: https://github.com/pytorch/pytorch/releases/tag/v2.3.0 [v2.2.2]: https://github.com/pytorch/pytorch/releases/tag/v2.2.2 [v2.2.0]: https://github.com/pytorch/pytorch/releases/tag/v2.2.0 @@ -388,11 +401,13 @@ It is the image user's responsibility to ensure that any use of The images below [v2.0.1]: https://github.com/pytorch/pytorch/releases/tag/v2.0.1 [v2.0.0]: https://github.com/pytorch/pytorch/releases/tag/v2.0.0 +[v3.0]: https://github.com/intel/neural-compressor/releases/tag/v3.0 [v2.6]: https://github.com/intel/neural-compressor/releases/tag/v2.6 [v2.4.1]: https://github.com/intel/neural-compressor/releases/tag/v2.4.1 [v2.3.1]: https://github.com/intel/neural-compressor/releases/tag/v2.3.1 [v2.1.1]: https://github.com/intel/neural-compressor/releases/tag/v2.1.1 +[v2.4.0+cpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.4.0%2Bcpu [v2.3.0+cpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.3.0%2Bcpu [v2.2.0+cpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.2.0%2Bcpu [v2.1.100+cpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.1.0%2Bcpu @@ -400,14 +415,16 @@ It is the image user's responsibility to ensure that any use of The images below [v2.0.100+cpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.0.0%2Bcpu [v2.0.0+cpu]: https://github.com/intel/intel-extension-for-pytorch/releases/tag/v2.0.0%2Bcpu +[ccl-v2.4.0]: https://github.com/intel/torch-ccl/releases/tag/v2.4.0%2Bcpu%2Brc0 [ccl-v2.3.0]: https://github.com/intel/torch-ccl/releases/tag/v2.3.0%2Bcpu [ccl-v2.2.0]: https://github.com/intel/torch-ccl/releases/tag/v2.2.0%2Bcpu [ccl-v2.1.0]: https://github.com/intel/torch-ccl/releases/tag/v2.1.0%2Bcpu [ccl-v2.0.0]: https://github.com/intel/torch-ccl/releases/tag/v2.1.0%2Bcpu -[v4.41.2]: https://github.com/huggingface/transformers/releases/tag/v4.41.2 +[v4.44.0]: https://github.com/huggingface/transformers/releases/tag/v4.44.0 +[914]: https://dgpu-docs.intel.com/releases/stable_914_33_20240730.html [803]: https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html [736]: https://dgpu-docs.intel.com/releases/stable_736_25_20231031.html [647]: https://dgpu-docs.intel.com/releases/stable_647_21_20230714.html diff --git a/pytorch/docker-compose.yaml b/pytorch/docker-compose.yaml index 03f51ab4e..838ee5cb0 100644 --- a/pytorch/docker-compose.yaml +++ b/pytorch/docker-compose.yaml @@ -25,16 +25,16 @@ services: BASE_IMAGE_NAME: ${BASE_IMAGE_NAME:-ubuntu} BASE_IMAGE_TAG: ${BASE_IMAGE_TAG:-22.04} GITHUB_RUN_NUMBER: ${GITHUB_RUN_NUMBER:-0} - IPEX_VERSION: ${IPEX_VERSION:-2.3.0} + IPEX_VERSION: ${IPEX_VERSION:-2.4.0} MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Linux-x86_64} NO_PROXY: '' PACKAGE_OPTION: ${PACKAGE_OPTION:-pip} PYTHON_VERSION: ${PYTHON_VERSION:-3.10} - PYTORCH_VERSION: ${PYTORCH_VERSION:-2.3.0+cpu} + PYTORCH_VERSION: ${PYTORCH_VERSION:-2.4.0+cpu} REGISTRY: ${REGISTRY} REPO: ${REPO} - TORCHAUDIO_VERSION: ${TORCHAUDIO_VERSION:-2.3.0+cpu} - TORCHVISION_VERSION: ${TORCHVISION_VERSION:-0.18.0+cpu} + TORCHAUDIO_VERSION: ${TORCHAUDIO_VERSION:-2.4.0} + TORCHVISION_VERSION: ${TORCHVISION_VERSION:-0.19.0} context: . labels: dependency.python: ${PYTHON_VERSION:-3.10} @@ -43,21 +43,21 @@ services: org.opencontainers.base.name: "intel/python:3.10-core" org.opencontainers.image.name: "intel/intel-optimized-pytorch" org.opencontainers.image.title: "Intel® Extension for PyTorch Base Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.2.0}-${PACKAGE_OPTION:-pip}-base + org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-base target: ipex-base-${PACKAGE_OPTION:-pip} command: > sh -c "python -c 'import torch; import intel_extension_for_pytorch as ipex; print(\"torch:\", torch.__version__, \" ipex:\",ipex.__version__)'" depends_on: - ${PACKAGE_OPTION:-pip} - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-base + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-base pull_policy: always jupyter: build: labels: dependency.python.pip: jupyter-requirements.txt - org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.2.0}-${PACKAGE_OPTION:-pip}-base" + org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-base" org.opencontainers.image.title: "Intel® Extension for PyTorch Jupyter Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.2.0}-${PACKAGE_OPTION:-pip}-jupyter + org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-jupyter target: jupyter command: > bash -c "python -m jupyter --version" @@ -65,7 +65,7 @@ services: http_proxy: ${http_proxy} https_proxy: ${https_proxy} extends: ipex-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-jupyter + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-jupyter network_mode: host ports: - 8888:8888 @@ -79,9 +79,9 @@ services: dependency.pip.apt.virtualenv: true dependency.pip.deepspeed: 0.14.4 dependency.python.pip: multinode/requirements.txt - org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.2.0}-${PACKAGE_OPTION:-pip}-base" + org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-base" org.opencontainers.image.title: "Intel® Extension for PyTorch MultiNode Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.2.0}-${PACKAGE_OPTION:-pip}-multinode + org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-multinode target: multinode command: > bash -c "python -c 'import neural_compressor;import oneccl_bindings_for_pytorch as oneccl;import deepspeed; @@ -89,43 +89,39 @@ services: \"\\nOneCCL:\", oneccl.__version__, \"\\nDeepspeed:\", deepspeed.__version__)'" extends: ipex-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} shm_size: 2gb xpu: build: args: - CCL_VER: ${CCL_VER:-2021.12.0-309} - DPCPP_VER: ${DPCPP_VER:-2024.1.0-963} - ICD_VER: ${ICD_VER:-23.43.27642.40-803~22.04} - IPEX_XPU_VERSION: ${IPEX_VERSION:-2.1.20} - LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.14.0-744~22.04} - LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.27642.40-803~22.04} - LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.14.0-744~22.04} - MKL_VER: ${MKL_VER:-2024.1.0-691} + CCL_VER: ${CCL_VER:-2021.13.1-31} + DPCPP_VER: ${DPCPP_VER:-2024.2.1-1079} + ICD_VER: ${ICD_VER:-24.22.29735.27-914~22.04} + LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.17.6-914~22.04} + LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.29735.27-914~22.04} + LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.17.6-914~22.04} + MKL_VER: ${MKL_VER:-2024.2.1-103} NO_PROXY: '' - ONECCL_VERSION: ${ONECCL_VERSION:-2.1.300} PACKAGE_OPTION: ${PACKAGE_OPTION:-pip} - PYTORCH_XPU_VERSION: ${PYTORCH_VERSION:-2.1.0} - TORCHVISION_XPU_VERSION: ${TORCHVISION_VERSION:-0.16.0} labels: dependency.apt.build-essential: true dependency.apt.clinfo: true dependency.apt.git: true dependency.apt.gnupg2: true dependency.apt.gpg-agent: true - dependency.apt.intel-level-zero-gpu: ${LEVEL_ZERO_GPU_VER:-1.3.27642.40-803~22.04} - dependency.apt.intel-oneapi-runtime-ccl: ${CCL_VER:-2021.12.0-309} - dependency.apt.intel-oneapi-runtime-dpcpp-cpp: ${DPCPP_VER:-2024.1.0-963} - dependency.apt.intel-oneapi-runtime-mkl: ${MKL_VER:-2024.1.0-691} + dependency.apt.intel-level-zero-gpu: ${LEVEL_ZERO_GPU_VER:-1.3.29735.27-914~22.04} + dependency.apt.intel-oneapi-runtime-ccl: ${CCL_VER:-2021.13.1-31} + dependency.apt.intel-oneapi-runtime-dpcpp-cpp: ${DPCPP_VER:-2024.2.1-1079} + dependency.apt.intel-oneapi-runtime-mkl: ${MKL_VER:-2024.2.1-103} dependency.apt.intel-opencl-icd: ${ICD_VER:-23.43.27642.40-803~22.04} - dependency.apt.level-zero: ${LEVEL_ZERO_VER:-1.14.0-744~22.04} - dependency.apt.level-zero-dev: ${LEVEL_ZERO_DEV_VER:-1.14.0-744~22.04} + dependency.apt.level-zero: ${LEVEL_ZERO_VER:-1.17.6-914~22.04} + dependency.apt.level-zero-dev: ${LEVEL_ZERO_DEV_VER:-1.17.6-914~22.04} dependency.apt.rsync: true dependency.apt.unzip: true dependency.idp.pip: false org.opencontainers.base.name: "intel/python:3.10-core" org.opencontainers.image.title: "Intel® Extension for PyTorch XPU Base Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.1.20}-xpu-${PACKAGE_OPTION:-pip}-base + org.opencontainers.image.version: ${IPEX_VERSION:-2.1.40}-xpu-${PACKAGE_OPTION:-pip}-base target: ipex-xpu-base command: > python -c "import torch;print(torch.device('xpu'));import @@ -135,33 +131,29 @@ services: {ipex.xpu.get_device_properties(i)}') for i in range(ipex.xpu.device_count())];" extends: ipex-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.30xpu}-xpu-base + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.40xpu}-xpu-base xpu-jupyter: build: args: - CCL_VER: ${CCL_VER:-2021.12.0-309} - DPCPP_VER: ${DPCPP_VER:-2024.1.0-963} - ICD_VER: ${ICD_VER:-23.43.27642.40-803~22.04} - IPEX_XPU_VERSION: ${IPEX_VERSION:-2.1.20} - LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.14.0-744~22.04} - LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.27642.40-803~22.04} - LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.14.0-744~22.04} - MKL_VER: ${MKL_VER:-2024.1.0-691} + CCL_VER: ${CCL_VER:-2021.13.1-31} + DPCPP_VER: ${DPCPP_VER:-2024.2.1-1079} + ICD_VER: ${ICD_VER:-24.22.29735.27-914~22.04} + LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.17.6-914~22.04} + LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.29735.27-914~22.04} + LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.17.6-914~22.04} + MKL_VER: ${MKL_VER:-2024.2.1-103} NO_PROXY: '' - ONECCL_VERSION: ${ONECCL_VERSION:-2.1.200} PACKAGE_OPTION: ${PACKAGE_OPTION:-pip} - PYTORCH_XPU_VERSION: ${PYTORCH_VERSION:-2.1.0} - TORCHVISION_XPU_VERSION: ${TORCHVISION_VERSION:-0.16.0} labels: dependency.python.pip: jupyter-requirements.txt - org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.1.20}-xpu-${PACKAGE_OPTION:-pip}-base" + org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.1.40}-xpu-${PACKAGE_OPTION:-pip}-base" org.opencontainers.image.title: "Intel® Extension for PyTorch XPU Jupyter Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.1.20}-xpu-${PACKAGE_OPTION:-pip}-jupyter + org.opencontainers.image.version: ${IPEX_VERSION:-2.1.40}-xpu-${PACKAGE_OPTION:-pip}-jupyter target: ipex-xpu-jupyter command: > bash -c "python -m jupyter --version" extends: ipex-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.30xpu}-xpu-jupyter + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.40xpu}-xpu-jupyter ports: - 8888:8888 torchserve: @@ -177,7 +169,7 @@ services: docs: serving org.opencontainers.base.name: "intel/python:3.10-core" org.opencontainers.image.title: "Intel® Extension for PyTorch Serving Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.2.0}-serving-cpu + org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-serving-cpu target: torchserve command: torchserve --version entrypoint: "" @@ -192,14 +184,14 @@ services: hf-genai: build: args: - HF_VERSION: ${HF_VERSION:-4.41.2} + HF_VERSION: ${HF_VERSION:-4.44.0} labels: dependency.python.pip: hf-genai-requirements.txt - org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.3.0}-${PACKAGE_OPTION:-pip}-multinode" + org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-multinode" org.opencontainers.image.title: "Intel® Extension for PyTorch MultiNode Huggingface Generative AI Image" - org.opencontainers.image.version: ${IPEX_VERSION:-2.3.0}-${PACKAGE_OPTION:-pip}-multinode-hf-${HF_VERSION:-4.41.2}-genai" + org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-multinode-hf-${HF_VERSION:-4.44.0}-genai" target: hf-genai extends: ipex-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-hf-${HF_VERSION:-4.41.2} + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-hf-${HF_VERSION:-4.44.0} command: > - bash -c "python-c 'import transformers; print(transformers.__version__)'" + bash -c "python -c 'import transformers; print(transformers.__version__)'" diff --git a/pytorch/hf-genai-requirements.txt b/pytorch/hf-genai-requirements.txt index df77695f6..6671cbaf5 100644 --- a/pytorch/hf-genai-requirements.txt +++ b/pytorch/hf-genai-requirements.txt @@ -1,13 +1,13 @@ -accelerate==0.32.1 -datasets==2.20.0 +accelerate==0.33.0 +datasets==2.21.0 einops==0.8.0 evaluate==0.4.2 onnxruntime-extensions==0.11.0 onnxruntime==1.18.1 -peft==0.11.1 -protobuf==5.27.2 +peft==0.12.0 +protobuf==5.27.3 py-cpuinfo==9.0.0 scikit-learn==1.5.1 SentencePiece==0.2.0 tokenizers==0.19.1 -transformers==4.42.4 +transformers==4.44.0 diff --git a/pytorch/jupyter-requirements.txt b/pytorch/jupyter-requirements.txt index b5ab6652f..e95ad6e83 100644 --- a/pytorch/jupyter-requirements.txt +++ b/pytorch/jupyter-requirements.txt @@ -1,4 +1,4 @@ -jupyterlab==4.3.0a2 +jupyterlab==4.3.0b0 jupyterhub==5.1.0 notebook==7.3.0a1 jupyter-server-proxy>=4.1.2 diff --git a/pytorch/multinode/requirements.txt b/pytorch/multinode/requirements.txt index 53f579ca9..c941708ac 100644 --- a/pytorch/multinode/requirements.txt +++ b/pytorch/multinode/requirements.txt @@ -1,5 +1,5 @@ -neural-compressor==2.6 -oneccl_bind_pt==2.3.0+cpu ---extra-index-url https://developer.intel.com/ipex-whl-stable-cpu +neural-compressor==3.0 +oneccl_bind_pt==2.4.0+cpu +--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/us/ oneccl-devel>=2021.13.0 # required to build deepspeed ops mpi4py>=3.1.0 # required to build deepspeed ops diff --git a/pytorch/requirements.txt b/pytorch/requirements.txt index 6e20f9eaf..664b5ad8b 100644 --- a/pytorch/requirements.txt +++ b/pytorch/requirements.txt @@ -1,6 +1,6 @@ -torch==2.3.1 -torchvision==0.18.1 -torchaudio==2.3.1 --f https://download.pytorch.org/whl/cpu/torch_stable.html -intel_extension_for_pytorch==2.3.100+cpu ---extra-index-url https://developer.intel.com/ipex-whl-stable-cpu +torch==2.4.0+cpu +torchvision==0.19.0+cpu +torchaudio==2.4.0+cpu +--extra-index-url https://download.pytorch.org/whl/cpu +intel_extension_for_pytorch==2.4.0+cpu +--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/us/ diff --git a/pytorch/serving/README.md b/pytorch/serving/README.md index 133c48f49..5e48251fe 100644 --- a/pytorch/serving/README.md +++ b/pytorch/serving/README.md @@ -16,7 +16,7 @@ Follow the instructions found in the link above depending on whether you are int curl -O https://download.pytorch.org/models/squeezenet1_1-b8a52dc0.pth docker run --rm -it \ -v $PWD:/home/model-server \ - intel/intel-optimized-pytorch:2.2.0-serving-cpu \ + intel/intel-optimized-pytorch:2.4.0-serving-cpu \ torch-model-archiver --model-name squeezenet \ --version 1.0 \ --model-file model-archive/model.py \ @@ -34,7 +34,7 @@ Test Torchserve with the new archived model. The example below is for the squeez docker run -d --rm --name server \ -v $PWD:/home/model-server/model-store \ --net=host \ - intel/intel-optimized-pytorch:2.2.0-serving-cpu + intel/intel-optimized-pytorch:2.4.0-serving-cpu # Verify that the container has launched successfully docker logs server # Attempt to register the model and make an inference request @@ -87,7 +87,7 @@ As demonstrated in the above example, models must be registered before they can -v $PWD:/home/model-server/model-store \ -v $PWD/config.properties:/home/model-server/config.properties \ --net=host \ - intel/intel-optimized-pytorch:2.2.0-serving-cpu + intel/intel-optimized-pytorch:2.4.0-serving-cpu # Verify that the container has launched successfully docker logs server # Check the models list diff --git a/pytorch/serving/build-kfs.sh b/pytorch/serving/build-kfs.sh index 7cdedc934..89e308232 100755 --- a/pytorch/serving/build-kfs.sh +++ b/pytorch/serving/build-kfs.sh @@ -16,7 +16,7 @@ cd .. || exit docker compose pull torchserve -docker tag "$(docker images -q | head -n1)" intel/torchserve:latest +docker tag "${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-ubuntu-22.04-py3.10-torchserve" intel/torchserve:latest git clone https://github.com/pytorch/serve cd serve/kubernetes/kserve || exit git apply ../../../serving/kfs.patch diff --git a/pytorch/serving/config.properties b/pytorch/serving/config.properties index 8f17094d5..ecaec9e0e 100644 --- a/pytorch/serving/config.properties +++ b/pytorch/serving/config.properties @@ -12,3 +12,4 @@ cpu_launcher_enable=true cpu_launcher_args=--use_logical_core disable_token_authorization=true enable_model_api=true +enable_envvars_config=true diff --git a/pytorch/serving/patch.yaml b/pytorch/serving/patch.yaml index 487eab342..cd18e8470 100644 --- a/pytorch/serving/patch.yaml +++ b/pytorch/serving/patch.yaml @@ -242,7 +242,7 @@ spec: - grpc-v1 containers: - name: kserve-container - image: "intel/intel-extension-for-pytorch:2.2.0-serving-cpu-kserve" + image: "intel/intel-extension-for-pytorch:2.4.0-serving-cpu-kserve" args: - torchserve - --start diff --git a/pytorch/tests/tests.yaml b/pytorch/tests/tests.yaml index 1011c7a07..21aeeadcf 100644 --- a/pytorch/tests/tests.yaml +++ b/pytorch/tests/tests.yaml @@ -13,66 +13,66 @@ # limitations under the License. import-ipex-cpu-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-base cmd: python -c "import torch;import intel_extension_for_pytorch as ipex;print(f'torch {torch.__version__} ipex {ipex.__version__}')" import-ipex-xpu-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.30xpu}-xpu-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.40xpu}-xpu-base cmd: python -c "import torch; import intel_extension_for_pytorch as ipex;[print(f'[{i}] {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];" device: ["/dev/dri"] import-cpu-jupyter-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-jupyter + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-jupyter cmd: python -m jupyter --version import-xpu-jupyter-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.30xpu}-xpu-jupyter + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.40xpu}-xpu-jupyter cmd: python -m jupyter --version device: ["/dev/dri"] import-cpu-oneccl-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} cmd: python -c "'import oneccl_bindings_for_pytorch as oneccl;print(oneccl.__version__)'" import-cpu-transformers-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-hf-${HF_VERSION:-4.41.2} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-hf-${HF_VERSION:-4.44.0} cmd: python -c "import transformers;print(f'transformers {transformers.__version__}');assert transformers.utils.import_utils.is_ipex_available()" import-cpu-inc-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} cmd: python -c "'import neural_compressor as inc;print(inc.__version__)'" import-cpu-deepspeed-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} cmd: ds_report shm_size: 2gb ipex-cpu-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-base cmd: python /tests/ipex-resnet50.py --ipex --device cpu --backend gloo volumes: - dst: /tests src: $PWD/pytorch/tests ipex-xpu-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.30xpu}-xpu-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.40xpu}-xpu-base cmd: python /tests/ipex-resnet50.py --ipex --device xpu device: ["/dev/dri"] volumes: - dst: /tests src: $PWD/pytorch/tests ipex-xpu-jupyter-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.30xpu}-xpu-jupyter + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.1.40xpu}-xpu-jupyter cmd: papermill --log-output /jupyter/xpu.ipynb -k python3 device: ["/dev/dri"] notebook: True oneccl-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} cmd: ipexrun cpu /tests/ipex-resnet50.py --ipex --device cpu --backend ccl privileged: true volumes: - dst: /tests src: $PWD/pytorch/tests oneccl-ds-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} cmd: ipexrun cpu /tests/ipex-resnet50.py --ipex --device cpu --backend ccl --deepspeed privileged: true volumes: - dst: /tests src: $PWD/pytorch/tests inc-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.0}-oneccl-inc-${INC_VERSION:-2.6} + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0} cmd: python /tests/inc-quant.py volumes: - dst: /tests diff --git a/pytorch/torchserve-requirements.txt b/pytorch/torchserve-requirements.txt index 0dbb45d50..f495a6863 100644 --- a/pytorch/torchserve-requirements.txt +++ b/pytorch/torchserve-requirements.txt @@ -7,6 +7,6 @@ torch-model-archiver==0.11.1 torch-workflow-archiver==0.2.14 torchserve==0.11.1 torchtext==0.18.0 -torchvision==0.18.1 --f https://developer.intel.com/ipex-whl-stable-cpu -intel_extension_for_pytorch==2.3.100+cpu +torchvision==0.19.0 +-f https://pytorch-extension.intel.com/release-whl/stable/cpu/us/ +intel_extension_for_pytorch==2.4.0+cpu diff --git a/pytorch/xpu-requirements.txt b/pytorch/xpu-requirements.txt index b64b92a4b..5d7d2e8ac 100644 --- a/pytorch/xpu-requirements.txt +++ b/pytorch/xpu-requirements.txt @@ -1,7 +1,8 @@ -torch==2.1.0.post2+cxx11.abi -torchvision==0.16.0.post2+cxx11.abi -torchaudio==2.1.0.post2+cxx11.abi -intel_extension_for_pytorch==2.1.30+xpu -oneccl_bind_pt==2.1.300+xpu +torch==2.1.0.post3+cxx11.abi +torchvision==0.16.0.post3+cxx11.abi +torchaudio==2.1.0.post3+cxx11.abi +intel_extension_for_pytorch==2.1.40+xpu +oneccl_bind_pt==2.1.400+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us -setuptools==71.1.0 +setuptools==69.5.1 +numpy==1.26.4 diff --git a/tensorflow/Dockerfile b/tensorflow/Dockerfile index 47dc728fd..a54b5466b 100644 --- a/tensorflow/Dockerfile +++ b/tensorflow/Dockerfile @@ -254,11 +254,10 @@ RUN no_proxy="" NO_PROXY="" apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -ARG TF_VER="2.15.0" +ARG ITEX_VER="2.15.0.1" -RUN conda install intel-extension-for-tensorflow=${TF_VER}=*xpu* \ - -c https://software.repos.intel.com/python/conda \ - -c conda-forge +RUN conda install -n idp -y intel-extension-for-tensorflow=${ITEX_VER}=*xpu* \ + -c https://software.repos.intel.com/python/conda ENV LD_LIBRARY_PATH=/opt/conda/envs/idp/lib:$LD_LIBRARY_PATH diff --git a/tensorflow/README.md b/tensorflow/README.md index c92533efb..195cebdf3 100644 --- a/tensorflow/README.md +++ b/tensorflow/README.md @@ -37,6 +37,7 @@ The images below additionally include [Jupyter Notebook](https://jupyter.org/) s | Tag(s) | TensorFlow | IPEX | Driver | Dockerfile | | ------------- | ----------- | ------------- | ------ | --------------- | +| `2.15.0.1-xpu-jupyter` | [v2.15.1] | [v2.15.0.1] | [803.63]| [v0.4.0-Beta] | | `xpu-jupyter` | [v2.14.1] | [v2.14.0.1] | [736] | [v0.3.4] | ### Run the XPU Jupyter Container @@ -48,7 +49,7 @@ docker run -it --rm \ --device /dev/dri \ -v /dev/dri/by-path:/dev/dri/by-path \ --ipc=host \ - intel/intel-extension-for-tensorflow:xpu-jupyter + intel/intel-extension-for-tensorflow:2.15.0.1-xpu-jupyter ``` After running the command above, copy the URL (something like `http://127.0.0.1:$PORT/?token=***`) into your browser to access the notebook server. @@ -104,7 +105,7 @@ docker run -it --rm \ --net=host \ -v $PWD/workspace:/workspace \ -w /workspace \ - intel/intel-extension-for-tensorflow:xpu-jupyter + intel/intel-extension-for-tensorflow:2.15.0-pip-jupyter ``` After running the command above, copy the URL (something like `http://127.0.0.1:$PORT/?token=***`) into your browser to access the notebook server. @@ -170,6 +171,22 @@ The images below additionally include [Horovod]: | `2.14.0-idp-openmpi-multinode` | [v2.14.1] | [v2.14.0.1] | [v0.28.1] | [v0.3.4] | | `2.13-idp-openmpi-mulitnode` | [v2.13.0] | [v2.13.0.0] | [v0.28.0] | [v0.2.3] | +## XPU images with Intel® Distribution for Python* + +The images below are built only with CPU and GPU optimizations and include [Intel® Distribution for Python*]: + +| Tag(s) | Pytorch | ITEX | Driver | Dockerfile | +| ---------------- | -------- | ------------ | -------- | ------ | +| `2.15.0.1-xpu-idp-base` | [v2.15.1] | [v2.15.0.1] | [803] | [v0.4.0-Beta] | +| `2.15.0-xpu-idp-base` | [v2.15.0] | [v2.15.0.0] | [803] | [v0.4.0-Beta] | + +The images below additionally include [Jupyter Notebook](https://jupyter.org/) server: + +| Tag(s) | Pytorch | IPEX | Driver | Jupyter Port | Dockerfile | +| --------------------- | -------- | ------------- | ------ | ------------ | --------------- | +| `2.15.0.1-xpu-idp-jupyter` | [v2.15.1] | [v2.15.0.1] | [803] | `8888` | [v0.4.0-Beta] | +| `2.15.0-xpu-idp-jupyter` | [v2.1.0] | [v2.15.0.0] | [803] | `8888` | [v0.4.0-Beta] | + ## 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: diff --git a/tensorflow/docker-compose.yaml b/tensorflow/docker-compose.yaml index 2d7e84a01..9583b2966 100644 --- a/tensorflow/docker-compose.yaml +++ b/tensorflow/docker-compose.yaml @@ -95,10 +95,10 @@ services: LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.27642.40-803~22.04} LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.14.0-744~22.04} LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.14.0-744~22.04} - DPCPP_VER: ${DPCPP_VER:-2024.1.0-963} - MKL_VER: ${MKL_VER:-2024.1.0-691} - CCL_VER: ${CCL_VER:-2021.12.0-309} - TF_VER: ${TF_VER:-2.15.0} + DPCPP_VER: ${DPCPP_VER:-2024.2.1-1079} + MKL_VER: ${MKL_VER:-2024.2.1-103} + CCL_VER: ${CCL_VER:-2021.13.1-31} + TF_VER: ${TF_VER:-2.15.1} no_proxy: '' NO_PROXY: '' labels: @@ -108,9 +108,9 @@ services: dependency.apt.gnupg2: true dependency.apt.gpg-agent: true dependency.apt.intel-level-zero-gpu: ${LEVEL_ZERO_GPU_VER:-1.3.27642.40-803~22.04} - dependency.apt.intel-oneapi-runtime-ccl: ${CCL_VER:-2021.12.0-309} - dependency.apt.intel-oneapi-runtime-dpcpp-cpp: ${DPCPP_VER:-2024.1.0-963} - dependency.apt.intel-oneapi-runtime-mkl: ${MKL_VER:-2024.1.0-691} + dependency.apt.intel-oneapi-runtime-ccl: ${CCL_VER:-2021.13.1-31} + dependency.apt.intel-oneapi-runtime-dpcpp-cpp: ${DPCPP_VER:-2024.2.1-1079} + dependency.apt.intel-oneapi-runtime-mkl: ${MKL_VER:-2024.2.1-103} dependency.apt.intel-opencl-icd: ${ICD_VER:-23.43.27642.40-803~22.04} dependency.apt.level-zero: ${LEVEL_ZERO_VER:-1.14.0-744~22.04} dependency.apt.level-zero-dev: ${LEVEL_ZERO_DEV_VER:-1.14.0-744~22.04} @@ -124,7 +124,7 @@ services: command: > sh -c "python -c 'import tensorflow as tf;print(tf.__version__);from tensorflow.python.client import device_lib;print(device_lib.list_local_devices())'" extends: tf-base - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.0}-itex-xpu-base + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.1}-itex-xpu-base xpu-jupyter: build: args: @@ -132,10 +132,10 @@ services: LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.27642.40-803~22.04} LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.14.0-744~22.04} LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.14.0-744~22.04} - DPCPP_VER: ${DPCPP_VER:-2024.1.0-963} - MKL_VER: ${MKL_VER:-2024.1.0-691} - CCL_VER: ${CCL_VER:-2021.12.0-309} - TF_VER: ${TF_VER:-2.15.0} + DPCPP_VER: ${DPCPP_VER:-2024.2.1-1079} + MKL_VER: ${MKL_VER:-2024.2.1-103} + CCL_VER: ${CCL_VER:-2021.13.1-31} + ITEX_VER: ${ITEX_VER:-2.15.0.1} no_proxy: '' NO_PROXY: '' labels: @@ -147,4 +147,4 @@ services: extends: tf-base command: > bash -c "python -m jupyter --version" - image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.0}-itex-xpu-jupyter + image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.1}-itex-xpu-jupyter diff --git a/tensorflow/tests/tests.yaml b/tensorflow/tests/tests.yaml index 0d45d9e88..0fa5b2b3f 100644 --- a/tensorflow/tests/tests.yaml +++ b/tensorflow/tests/tests.yaml @@ -17,8 +17,9 @@ import-itex-cpu-${PACKAGE_OPTION:-pip}: img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-${TF_VERSION:-2.15.0}-base cmd: python -c "from tensorflow.python.client import device_lib; print(device_lib.list_local_devices())" import-itex-xpu-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.0}-itex-xpu-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.1}-itex-xpu-base cmd: python /tests/xpu_import_test.py + device: ["/dev/dri"] volumes: - src: ${PWD}/tensorflow/tests dst: /tests @@ -26,8 +27,9 @@ import-cpu-jupyter-${PACKAGE_OPTION:-pip}: img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-${TF_VERSION:-2.15.0}-jupyter cmd: python -m jupyter --version import-xpu-jupyter-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.0}-itex-xpu-jupyter + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.1}-itex-xpu-jupyter cmd: python -m jupyter --version + device: ["/dev/dri"] import-multinode-${PACKAGE_OPTION:-pip}: img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-${TF_VERSION:-2.15.0}-horovod-${HOROVOD_VERSION:-0.28.1}-inc-${INC_VERSION:-2.6} cmd: horovodrun --check-build && mpirun --version && python -c 'import horovod.tensorflow as hvd;hvd.init();import horovod.tensorflow' @@ -41,15 +43,17 @@ itex-cpu-${PACKAGE_OPTION:-pip}: - src: ${PWD}/tensorflow/tests dst: /tests itex-xpu-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.0}-itex-xpu-base + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.1}-itex-xpu-base cmd: python /tests/tf_base_test.py + device: ["/dev/dri"] volumes: - dst: /tests src: $PWD/tensorflow/tests itex-xpu-jupyter-${PACKAGE_OPTION:-pip}: - img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.0}-itex-xpu-jupyter + img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-itex-${TF_VERSION:-2.15.1}-itex-xpu-jupyter cmd: papermill --log-output /jupyter/xpu.ipynb -k python3 - notebook: True + device: ["/dev/dri"] multinode-${PACKAGE_OPTION:-pip}: img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-${TF_VERSION:-2.15.0}-horovod-${HOROVOD_VERSION:-0.28.1}-inc-${INC_VERSION:-2.6} cmd: horovodrun -np 2 -H localhost:2 --binding-args="-bind-to socket -map-by socket" python /tests/tf_base_test.py diff --git a/tensorflow/xpu-requirements.txt b/tensorflow/xpu-requirements.txt index c70990480..0280ef9d5 100644 --- a/tensorflow/xpu-requirements.txt +++ b/tensorflow/xpu-requirements.txt @@ -1,2 +1,2 @@ -tensorflow==2.15.0 -intel-extension-for-tensorflow[xpu]==2.15.0.0 +tensorflow==2.15.1 +intel-extension-for-tensorflow[xpu]==2.15.0.1 diff --git a/workflows/charts/huggingface-llm/Dockerfile b/workflows/charts/huggingface-llm/Dockerfile index c565d1cdb..748750f9c 100644 --- a/workflows/charts/huggingface-llm/Dockerfile +++ b/workflows/charts/huggingface-llm/Dockerfile @@ -41,30 +41,4 @@ COPY requirements.txt . RUN python -m pip install --no-cache-dir -r requirements.txt -# Install OpenSSH for MPI to communicate between containers -RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ - openssh-client \ - openssh-server && \ - rm /etc/ssh/ssh_host_*_key \ - /etc/ssh/ssh_host_*_key.pub && \ - apt-get clean autoclean && \ - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* - -# Allow OpenSSH to talk to containers without asking for confirmation -# hadolint global ignore=SC2002 -RUN mkdir -p /var/run/sshd && \ - cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \ - echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \ - echo 'LoginGraceTime 0' >> /etc/ssh/sshd_config && \ - mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config - COPY scripts /workspace/scripts/ - -COPY generate_ssh_keys.sh /workspace/generate_ssh_keys.sh - -RUN cat /workspace/generate_ssh_keys.sh >> "${HOME}/.bash_profile" && \ - sed -i 's#source /inc/bin/activate##g' "${HOME}/.bashrc" && \ - cat /workspace/generate_ssh_keys.sh >> "${HOME}/.bashrc" - -ENV BASH_ENV=${HOME}/.bash_profile diff --git a/workflows/charts/huggingface-llm/templates/pytorchjob.yaml b/workflows/charts/huggingface-llm/templates/pytorchjob.yaml index 71689869a..1b626416f 100644 --- a/workflows/charts/huggingface-llm/templates/pytorchjob.yaml +++ b/workflows/charts/huggingface-llm/templates/pytorchjob.yaml @@ -39,125 +39,75 @@ spec: - name: pytorch image: {{ .Values.image.name }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - torchrun - - {{ .Values.distributed.script }} - - --model_name_or_path - - "{{ .Values.distributed.modelNameOrPath }}" - {{- if .Values.distributed.train.datasetName }} - - --dataset_name - - "{{ .Values.distributed.train.datasetName }}" - {{- end }} - - --dataset_cache_directory - - "{{ .Values.envVars.hfDatasetsCache }}" - {{- if .Values.distributed.train.dataFile }} - - --train_file - - "{{ .Values.distributed.train.dataFile }}" - {{- end }} - - --dataset_concatenation - - "{{ .Values.distributed.train.datasetConcatenation }}" - - --prompt_with_input - - "{{ .Values.distributed.train.promptWithInput }}" - - --prompt_without_input - - "{{ .Values.distributed.train.promptWithoutInput }}" - - --per_device_train_batch_size - - "{{ .Values.distributed.train.perDeviceBatchSize }}" - - --per_device_eval_batch_size - - "{{ .Values.distributed.eval.perDeviceBatchSize }}" - - --gradient_accumulation_steps - - "{{ .Values.distributed.train.gradientAccumulationSteps }}" - - --learning_rate - - "{{ .Values.distributed.train.learningRate }}" - - --num_train_epochs - - "{{ .Values.distributed.train.epochs }}" - - --max_steps - - "{{ .Values.distributed.train.maxSteps }}" - - --logging_steps - - "{{ .Values.distributed.train.loggingSteps }}" - - --save_total_limit - - "{{ .Values.distributed.train.saveTotalLimit }}" - - --output_dir - - "{{ .Values.distributed.train.outputDir }}" - - --validation_split_percentage - - "{{ .Values.distributed.eval.validationSplitPercentage }}" - - --log_level - - "{{ .Values.distributed.logLevel }}" - - --save_strategy - - "{{ .Values.distributed.train.saveStrategy }}" - - --ddp_find_unused_parameters - - "{{ .Values.distributed.train.ddpFindUnusedParameters }}" - {{- if .Values.distributed.train.ddpBackend }} - - --ddp_backend - - "{{ .Values.distributed.train.ddpBackend }}" - {{- end }} - {{- if .Values.distributed.train.instructionColumnName }} - - --instruction_column_name - - "{{ .Values.distributed.train.instructionColumnName }}" - {{- end }} - {{- if .Values.distributed.train.inputColumnName }} - - --input_column_name - - "{{ .Values.distributed.train.inputColumnName }}" - {{- end }} - {{- if .Values.distributed.train.outputColumnName }} - - --output_column_name - - "{{ .Values.distributed.train.outputColumnName }}" - {{- end }} - - --use_fast_tokenizer - - "{{ .Values.distributed.train.useFastTokenizer }}" - - --use_lora - - "{{ .Values.distributed.train.useLora }}" - - --lora_rank - - "{{ .Values.distributed.train.loraRank }}" - - --lora_alpha - - "{{ .Values.distributed.train.loraAlpha }}" - - --lora_dropout - - "{{ .Values.distributed.train.loraDropout }}" - - --lora_target_modules - - "{{ .Values.distributed.train.loraTargetModules }}" - - --no_cuda - - "{{ .Values.distributed.train.noCuda }}" - - --overwrite_output_dir - - "{{ .Values.distributed.train.overwriteOutputDir }}" - - --do_train - - "{{ .Values.distributed.doTrain }}" - - --do_eval - - "{{ .Values.distributed.doEval }}" - - --bf16 - - "{{ .Values.distributed.train.bf16 }}" - - --use_ipex - - "{{ .Values.distributed.train.useIpex }}" - - --do_benchmark - - "{{ .Values.distributed.doBenchmark }}" - - --benchmark_warmup - - "{{ .Values.distributed.benchmark.warmup }}" - - --benchmark_iterations - - "{{ .Values.distributed.benchmark.iterations }}" - - --benchmark_cores_per_instance - - "{{ .Values.distributed.benchmark.coresPerInstance }}" - - --benchmark_num_instances - - "{{ .Values.distributed.benchmark.numInstances }}" - - --do_quantize - - "{{ .Values.distributed.doQuantize }}" - - --peft_model_dir - - "{{ .Values.distributed.quantize.peftModelDir }}" - - --quantize_output_dir - - "{{ .Values.distributed.quantize.outputDir }}" - - --woq_bits - - "{{ .Values.distributed.quantize.woqBits }}" - - --woq_group_size - - "{{ .Values.distributed.quantize.woqGroupSize }}" - - --woq_scheme - - "{{ .Values.distributed.quantize.woqScheme }}" - - --woq_algo - - "{{ .Values.distributed.quantize.woqAlgo }}" + args: + - >- + torchrun {{ .Values.distributed.script }} \ + --model_name_or_path {{ .Values.distributed.modelNameOrPath }} \ + {{- if .Values.distributed.train.datasetName }} + --dataset_name {{ .Values.distributed.train.datasetName }} \ + {{- end }} + --dataset_cache_directory {{ .Values.envVars.hfDatasetsCache }} \ + {{- if .Values.distributed.train.dataFile }} + --train_file {{ .Values.distributed.train.dataFile }} \ + {{- end }} + --dataset_concatenation {{ .Values.distributed.train.datasetConcatenation }} \ + --prompt_with_input {{ .Values.distributed.train.promptWithInput }} \ + --prompt_without_input {{ .Values.distributed.train.promptWithoutInput }} \ + --per_device_train_batch_size {{ .Values.distributed.train.perDeviceBatchSize }} \ + --per_device_eval_batch_size {{ .Values.distributed.eval.perDeviceBatchSize }} \ + --gradient_accumulation_steps {{ .Values.distributed.train.gradientAccumulationSteps }} \ + --learning_rate {{ .Values.distributed.train.learningRate }} \ + --num_train_epochs {{ .Values.distributed.train.epochs }} \ + --max_steps {{ .Values.distributed.train.maxSteps }} \ + --logging_steps {{ .Values.distributed.train.loggingSteps }} \ + --save_total_limit {{ .Values.distributed.train.saveTotalLimit }} \ + --output_dir {{ .Values.distributed.train.outputDir }} \ + --validation_split_percentage {{ .Values.distributed.eval.validationSplitPercentage }} \ + --log_level {{ .Values.distributed.logLevel }} \ + --save_strategy {{ .Values.distributed.train.saveStrategy }} \ + --ddp_find_unused_parameters {{ .Values.distributed.train.ddpFindUnusedParameters }} \ + {{- if .Values.distributed.train.ddpBackend }} + --ddp_backend {{ .Values.distributed.train.ddpBackend }} \ + {{- end }} + {{- if .Values.distributed.train.instructionColumnName }} + --instruction_column_name {{ .Values.distributed.train.instructionColumnName }} \ + {{- end }} + {{- if .Values.distributed.train.inputColumnName }} + --input_column_name {{ .Values.distributed.train.inputColumnName }} \ + {{- end }} + {{- if .Values.distributed.train.outputColumnName }} + --output_column_name {{ .Values.distributed.train.outputColumnName }} \ + {{- end }} + --use_fast_tokenizer {{ .Values.distributed.train.useFastTokenizer }} \ + --use_lora {{ .Values.distributed.train.useLora }} \ + --lora_rank {{ .Values.distributed.train.loraRank }} \ + --lora_alpha {{ .Values.distributed.train.loraAlpha }} \ + --lora_dropout {{ .Values.distributed.train.loraDropout }} \ + --lora_target_modules {{ .Values.distributed.train.loraTargetModules }} \ + --no_cuda {{ .Values.distributed.train.noCuda }} \ + --overwrite_output_dir {{ .Values.distributed.train.overwriteOutputDir }} \ + --do_train {{ .Values.distributed.doTrain }} \ + --do_eval {{ .Values.distributed.doEval }} \ + --bf16 {{ .Values.distributed.train.bf16 }} \ + --use_ipex {{ .Values.distributed.train.useIpex }} \ + --do_benchmark {{ .Values.distributed.doBenchmark }} \ + --benchmark_warmup {{ .Values.distributed.benchmark.warmup }} \ + --benchmark_iterations {{ .Values.distributed.benchmark.iterations }} \ + --benchmark_cores_per_instance {{ .Values.distributed.benchmark.coresPerInstance }} \ + --benchmark_num_instances {{ .Values.distributed.benchmark.numInstances }} \ + --do_quantize {{ .Values.distributed.doQuantize }} \ + --peft_model_dir {{ .Values.distributed.quantize.peftModelDir }} \ + --quantize_output_dir {{ .Values.distributed.quantize.outputDir }} \ + --woq_bits {{ .Values.distributed.quantize.woqBits }} \ + --woq_group_size {{ .Values.distributed.quantize.woqGroupSize }} \ + --woq_scheme {{ .Values.distributed.quantize.woqScheme }} \ + --woq_algo {{ .Values.distributed.quantize.woqAlgo }}; {{- if .Values.deploy.env.enabled }} envFrom: - configMapRef: name: {{ .Values.deploy.env.configMapName }} {{- end }} env: - - name: CCL_ATL_TRANSPORT - value: ofi {{- if .Values.envVars.ldPreload }} - name: LD_PRELOAD value: "{{ .Values.envVars.ldPreload }}" diff --git a/workflows/charts/torchserve/README.md b/workflows/charts/torchserve/README.md index b84a964c2..b35cc7d48 100644 --- a/workflows/charts/torchserve/README.md +++ b/workflows/charts/torchserve/README.md @@ -18,6 +18,7 @@ For more information about how to use Intel Optimized TorchServe, check out the | deploy.resources.limits | object | `{"cpu":"4000m","memory":"1Gi"}` | Maximum resources per pod | | deploy.resources.requests | object | `{"cpu":"1000m","memory":"512Mi"}` | Minimum resources per pod | | deploy.storage.nfs | object | `{"enabled":false,"path":"nil","readOnly":true,"server":"nil","subPath":"nil"}` | Network File System (NFS) storage for models | +| deploy.tokens_disabled | bool | `false` | Set token authentication on or off. Checkout the latest [torchserve docs](https://github.com/pytorch/serve/blob/master/docs/token_authorization_api.md) for more details. | | fullnameOverride | string | `""` | Full qualified Domain Name | | nameOverride | string | `""` | Name of the serving service | | pvc.size | string | `"1Gi"` | Size of the storage | @@ -37,4 +38,4 @@ There are some additional steps that can be taken to prepare your service for yo - Integrate an [SSL Certificate](https://pytorch.org/serve/configuration.html#enable-ssl) in your model config file to serve models securely. ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/workflows/charts/torchserve/templates/NOTES.txt b/workflows/charts/torchserve/templates/NOTES.txt index 8796b2051..7cf61fc4b 100644 --- a/workflows/charts/torchserve/templates/NOTES.txt +++ b/workflows/charts/torchserve/templates/NOTES.txt @@ -14,3 +14,8 @@ echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT {{- end }} +{{- if eq false .Values.deploy.tokens_disabled }} +2. Display the tokens for accessing the APIs. For more details about token authentication checkout: https://github.com/pytorch/serve/blob/master/docs/token_authorization_api.md + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "torchserve.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + kubectl exec --namespace {{ .Release.Namespace }} $POD_NAME -- cat /home/model-server/key_file.json +{{- end }} diff --git a/workflows/charts/torchserve/templates/deploy.yaml b/workflows/charts/torchserve/templates/deploy.yaml index 544a2fb1d..85f031421 100644 --- a/workflows/charts/torchserve/templates/deploy.yaml +++ b/workflows/charts/torchserve/templates/deploy.yaml @@ -47,6 +47,9 @@ spec: - configMapRef: name: {{ .Values.deploy.env.configMapName }} {{- end }} + env: + - name: TS_DISABLE_TOKEN_AUTHORIZATION + value: "{{ .Values.deploy.tokens_disabled }}" ports: - name: rest-1 containerPort: 8080 diff --git a/workflows/charts/torchserve/values.yaml b/workflows/charts/torchserve/values.yaml index e95efb152..f59e1c408 100644 --- a/workflows/charts/torchserve/values.yaml +++ b/workflows/charts/torchserve/values.yaml @@ -23,6 +23,8 @@ deploy: env: configMapName: intel-proxy-config enabled: true + # -- Set token authentication on or off. Checkout the latest [torchserve docs](https://github.com/pytorch/serve/blob/master/docs/token_authorization_api.md) for more details. + tokens_disabled: true # -- Models to be loaded models: all # -- Model Server Configuration file location