Skip to content

Commit d199dbc

Browse files
mminellailayaperumalg
authored andcommitted
Updated README for CPU arch note
When building Spring AI, there is a dependecy on PyTorch which is dependent upon the CPU architecture of the machine it is running on. In MacOS, an x86 built JVM can run on an ARM processor due to Rosetta. However, this arrangement will result in the project attempting to get the x86 distribution of PyTorch which will not run on an ARM processor. This note is to clarify how to validate if your JDK is reporting the correct CPU architecture your machine is actually running. Auto-cherry-pick to 1.1.x Signed-off-by: Michael Minella <michael.minella@broadcom.com>
1 parent a8c9428 commit d199dbc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ To clone it you have to either:
7474
The project targets and build artifacts compatible with Java 17+, but requires JDK 21
7575
to build. This is enforced by the maven enforcer plugin.
7676

77+
**NOTE:** Building Spring AI requires components that depend on your specific CPU architecture (PyTorch for example). MacOS can seamlessly run x86 Java applications on ARM processors using Rosetta, but this will fail when building this project because it tries to download architecture-specific native dependencies. (Note: this is only an issue for building the project, not for consuming the libraries). If you are unsure if you have the correct JDK distribution for your CPU, run the command `java -XshowSettings:properties -version 2>&1 | grep os.arch` from a fresh terminal to validate that it matches your machine.
78+
7779
To build with running unit tests
7880

7981
```shell

0 commit comments

Comments
 (0)