Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
submodules: true

- name: Lint Manifest
run: flatpak-builder-lint --gha-format manifest ai.lemonade_server.Lemonade.yaml
run: flatpak-builder-lint --exceptions --user-exceptions exceptions.json --gha-format manifest ai.lemonade_server.Lemonade.yaml

- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
Expand Down
32 changes: 32 additions & 0 deletions 0003-fastflowlm-disable-usr-local-symlink.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -229,18 +229,6 @@
- if(FFTW3_PKG_FOUND)
- target_include_directories(flm PUBLIC ${FFTW3_PKG_INCLUDE_DIRS})
- target_link_libraries(flm PUBLIC ${FFTW3_PKG_LIBRARIES})
- else()
- target_link_libraries(flm PUBLIC fftw3)
- endif()
if(FFTW3F_PKG_FOUND)
target_include_directories(flm PUBLIC ${FFTW3F_PKG_INCLUDE_DIRS})
target_link_libraries(flm PUBLIC ${FFTW3F_PKG_LIBRARIES})
else()
target_link_libraries(flm PUBLIC fftw3f)
endif()
- if(FFTW3L_PKG_FOUND)
- target_include_directories(flm PUBLIC ${FFTW3L_PKG_INCLUDE_DIRS})
- target_link_libraries(flm PUBLIC ${FFTW3L_PKG_LIBRARIES})
- else()
- target_link_libraries(flm PUBLIC fftw3l)
- endif()
@@ -347,9 +331,0 @@
-if(NOT WIN32 AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr" AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
- install(CODE "
- message(STATUS \"Creating symlink for flm\")
- file(MAKE_DIRECTORY \"$ENV{DESTDIR}/usr/local/bin\")
- execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
- \"${CMAKE_INSTALL_PREFIX}/bin/flm\"
- \"$ENV{DESTDIR}/usr/local/bin/flm\")"
- )
-endif()
10 changes: 10 additions & 0 deletions ai.lemonade_server.Lemonade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ finish-args:
- --filesystem=xdg-run/lemonade:rw
- --env=WEBKIT_DISABLE_DMABUF_RENDERER=1
- --env=LEMONADE_DISABLE_SYSTEMD_JOURNAL=1
- --env=X_LEMONADE_FLM_LINUX_BETA=1
- --env=LD_LIBRARY_PATH=/app/lib
- --env=FLM_CONFIG_PATH=/app/share/flm/model_list.json
- --env=XILINX_XRT=/app

cleanup:
- /include
Expand All @@ -36,6 +40,12 @@ modules:
- modules/cpp-httplib.json
- modules/libwebsockets.json
- shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json
- modules/opencl-headers.json
- modules/rapidjson.json
- modules/boost.json
- modules/xrt.json
- modules/fftw3f.json
- modules/fastflowlm.json

- name: lemonade-cpp
buildsystem: cmake-ninja
Expand Down
7 changes: 7 additions & 0 deletions exceptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ai.lemonade_server.Lemonade": {
"module-rapidjson-source-git-branch": {
"linter-error": "project does not provide tagged releases since 2016"
}
}
}
20 changes: 20 additions & 0 deletions modules/boost.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "boost",
"buildsystem": "simple",
"cleanup": [
"/include",
"/lib/cmake",
"/lib/pkgconfig"
],
"build-commands": [
"./bootstrap.sh --prefix=/app",
"./b2 -j4 cxxflags=\"-std=c++17 -fPIC\" install link=shared,static --with-filesystem --with-program_options --with-system --layout=tagged"
],
"sources": [
{
"type": "archive",
"url": "https://archives.boost.io/release/1.81.0/source/boost_1_81_0.tar.bz2",
"sha256": "71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa"
}
]
}
37 changes: 37 additions & 0 deletions modules/fastflowlm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "fastflowlm",
"buildsystem": "cmake-ninja",
"build-options": {
"append-path": "/usr/lib/sdk/rust-stable/bin",
"env": {
"CARGO_NET_OFFLINE": "true"
}
},
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DFLM_VERSION=0.9.43",
"-DNPU_VERSION=32.0.203.304",
"-DXRT_INCLUDE_DIR=/app/include",
"-DXRT_LIB_DIR=/app/lib",
"-DCMAKE_XCLBIN_PREFIX=/app/share/flm"
],
"subdir": "src",
"sources": [
{
"type": "git",
"url": "https://github.com/FastFlowLM/FastFlowLM.git",
"commit": "5324dd73162e7005546d287aa4daeceff56e3b2c"
},
{
"type": "patch",
"path": "../0003-fastflowlm-disable-usr-local-symlink.patch"
},
{
"type": "inline",
"contents": "[source.crates-io]\nreplace-with = \"vendored-sources\"\n\n[source.vendored-sources]\ndirectory = \"/run/build/fastflowlm/cargo/vendor\"\n",
"dest": "third_party/tokenizers-cpp/rust/.cargo",
"dest-filename": "config.toml"
},
"generated-flm-cargo-sources.json"
]
}
26 changes: 26 additions & 0 deletions modules/fftw3f.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "fftw3f",
"buildsystem": "autotools",
"config-opts": [
"--enable-shared",
"--disable-static",
"--enable-threads",
"--enable-float",
"--enable-avx"
],
"cleanup": [
"/include",
"/lib/cmake",
"/lib/pkgconfig",
"/share/doc",
"/share/man",
"/bin"
],
"sources": [
{
"type": "archive",
"url": "https://www.fftw.org/fftw-3.3.10.tar.gz",
"sha256": "56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467"
}
]
}
Loading
Loading