Skip to content

Commit

Permalink
Docs m1 (#11578)
Browse files Browse the repository at this point in the history
* reverted docker build changes, removing aarch64 builds

* added documentation for M1 installations

* Update docs/docs/installation.mdx

* Apply suggestions from code review

Co-authored-by: Anca Lita <[email protected]>

* Update docs/docs/components.mdx

Co-authored-by: Anca Lita <[email protected]>

* removed unneded type ignore that let ci fail

* bumped spacy to 3.4

* explicitly defined dependency for spacy featurizer

* added external dependency versions as a fingerprint attribute for components

* Applying default config in SpacyNLP component

* Removed fixed vector testing, improved case test

* Reformatted using black

* Added changelog

* Exchanged importlib with pkg_resources for py37 compatibility

* using direct import

* Back to pkg-resources but with mapping for sklearn

* Unified definitions of required_packages as staticmethod in all components

* code quality

* made tensorflow metal optional

* Added note about retraining to changelog

* Distinguishing between m1 and others for spacy dependency

* fixed testing dependency issue

* fixed invalid docs links

Co-authored-by: Anca Lita <[email protected]>
Co-authored-by: Thomas Werkmeister <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2022
1 parent 226fd33 commit bce010b
Show file tree
Hide file tree
Showing 18 changed files with 381 additions and 698 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,6 @@ jobs:
uses: actions/checkout@v3
if: github.event_name != 'pull_request'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Read Poetry Version 🔢
run: |
echo "POETRY_VERSION=$(scripts/poetry-version.sh)" >> $GITHUB_ENV
Expand Down Expand Up @@ -626,7 +623,7 @@ jobs:
export IMAGE_TAG=${{ steps.check_image.outputs.base_image_hash }}
docker buildx bake -f docker/docker-bake.hcl base
- name: Push Docker base image if it's not building from a fork ⬆
- name: Push Docker base image if it's not building from a fork ⬆
if: (steps.check_image.outputs.base_exists == 'false' || env.IS_TAG_BUILD == 'true') && github.event.pull_request.head.repo.owner.login == 'RasaHQ'
run: |
export IMAGE_TAG=${{ steps.check_image.outputs.base_image_hash }}
Expand All @@ -638,7 +635,7 @@ jobs:
export IMAGE_TAG=${{ steps.check_image.outputs.base_mitie_image_hash }}
docker buildx bake -f docker/docker-bake.hcl base-mitie
- name: Push Docker mitie base image if it's not building from a fork ⬆
- name: Push Docker mitie base image if it's not building from a fork ⬆
if: steps.check_image.outputs.base_mitie_exists == 'false' && github.event.pull_request.head.repo.owner.login == 'RasaHQ'
run: |
export IMAGE_TAG=${{ steps.check_image.outputs.base_mitie_image_hash }}
Expand Down Expand Up @@ -725,7 +722,6 @@ jobs:
strategy:
matrix:
image: [default, full, mitie-en, spacy-de, spacy-en]
arch: [linux/amd64, linux/arm64]

steps:
# Due to an issue with checking out a wrong commit, we make sure
Expand All @@ -741,9 +737,6 @@ jobs:
uses: actions/checkout@v3
if: github.event_name != 'pull_request'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Free disk space
if: needs.changes.outputs.docker == 'true'
# tries to make sure we do not run out of disk space, see
Expand All @@ -767,9 +760,6 @@ jobs:
version: v0.5.1
driver: docker

- name: Echo Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to DockerHub Registry 🔢
if: needs.changes.outputs.docker == 'true'
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ env.DOCKERHUB_USERNAME }} --password-stdin || true
Expand All @@ -785,19 +775,19 @@ jobs:
- name: Build Docker image
if: needs.changes.outputs.docker == 'true'
run: |
docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl ${{ matrix.image }}
docker buildx bake -f docker/docker-bake.hcl ${{ matrix.image }}
- name: Push image with main tag 📦
if: needs.changes.outputs.docker == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'RasaHQ/rasa'
run: |
docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl ${{ matrix.image }} --push
docker buildx bake -f docker/docker-bake.hcl ${{ matrix.image }} --push
- name: Push image with ${{github.ref}} tag 📦
if: needs.changes.outputs.docker == 'true' && github.event_name == 'push' && env.IS_TAG_BUILD == 'true' && github.repository == 'RasaHQ/rasa'
run: |
IS_NEWEST_VERSION=${{ needs.build_docker_base_images_and_set_env.outputs.is_newest_version }}
docker buildx bake --set *.platform=${{ matrix.arch }} -f docker/docker-bake.hcl ${{ matrix.image }} --push
docker buildx bake -f docker/docker-bake.hcl ${{ matrix.image }} --push
# Tag the image as latest
if [[ "${IS_NEWEST_VERSION}" == "true" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions changelog/ATO-320.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Rasa supports native installations on Apple Silicon (M1 / M2). Please
follow the installation instructions and take a look at the limitations.
1 change: 1 addition & 0 deletions changelog/ATO-400.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added package versions of component dependencies as an additional part of fingerprinting calculation. Upgrading an dependency will thus lead to a retraining of the component in the future. Also, by changing fingerprint calculation, the next training after this change will be a complete retraining.
2 changes: 2 additions & 0 deletions docs/docs/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ Note: The `feature-dimension` for sequence and sentence features does not have t
:::note
To use `ConveRTFeaturizer`, install Rasa Open Source with `pip3 install rasa[convert]`.
Note that this component cannot currently run on MacOS using M1 / M2 architecture.
More information on this limitation is available [here](./installation.mdx#m1--m2-apple-silicon-limitations).
:::
Expand Down
Loading

0 comments on commit bce010b

Please sign in to comment.