mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
Add a recipe
This commit is contained in:
parent
5ab688b8c4
commit
c7d5aaa2b9
25
recipes/wip/libs/ml/libtorch/recipe.toml
Normal file
25
recipes/wip/libs/ml/libtorch/recipe.toml
Normal file
@ -0,0 +1,25 @@
|
||||
#TODO maybe incomplete script, see https://github.com/pytorch/pytorch/blob/main/docs/libtorch.rst#building-libtorch-using-cmake
|
||||
[source]
|
||||
git = "https://github.com/pytorch/pytorch"
|
||||
branch = "release/2.3"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir pytorch-build
|
||||
cd pytorch-build
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_CROSSCOMPILING=True
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-static"
|
||||
-DCMAKE_INSTALL_PREFIX="/"
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
|
||||
-DCMAKE_SYSTEM_NAME=Generic
|
||||
-DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=`which python3` -DCMAKE_INSTALL_PREFIX:PATH=../pytorch-install ../pytorch
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user