This is a picture hosting app using github as the backend.
What's a native image? See GraalVM Native Image.
-
If you have installed GraalVM and native-image tool, you can just run
$ sbt ni
It will be running for a long while(5~10 minutes), then generate a native image in
./target/graalvm-native-image/
. -
If you haven't installed GraalVM and native-image tool, and don't want to install them. You can try to build native image with docker-compose:
$ docker-compose run build-native-image
FYI: Image building requires large amounts of memory, especially if you build large images with truffle included.
See issue for insufficient memory.
It should be at least 4G heap space. I set -Xmx=6144m
for graalVMNativeImageOptions
.
According to GitHub Actions Documentation,
a Linux runner has 7 GB of RAM memory. It satisfies GraalVM requirement.