{"id":23383192,"url":"https://github.com/stwind/juce-libtorch","last_synced_at":"2026-02-01T23:02:11.421Z","repository":{"id":141904628,"uuid":"606427087","full_name":"stwind/juce-libtorch","owner":"stwind","description":"JUCE + libtorch","archived":false,"fork":false,"pushed_at":"2023-02-25T13:36:26.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-16T10:01:21.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stwind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-25T13:12:33.000Z","updated_at":"2024-12-14T03:51:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"779ddfb4-ba32-47cc-81fa-76fe9447511d","html_url":"https://github.com/stwind/juce-libtorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stwind/juce-libtorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stwind%2Fjuce-libtorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stwind%2Fjuce-libtorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stwind%2Fjuce-libtorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stwind%2Fjuce-libtorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stwind","download_url":"https://codeload.github.com/stwind/juce-libtorch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stwind%2Fjuce-libtorch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-21T22:18:55.726Z","updated_at":"2026-02-01T23:02:11.399Z","avatar_url":"https://github.com/stwind.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# juce-torchlib\n\n## Build\n\n### Prequisite\n\n- CMake 3.25\n\n### Download and build libtorch\n\nGo to in any folder, e.g. `temp/pytorch`, may take ~2 hours\n\n```sh\nTORCH_VERSION=1.13.1\n\n# download\nwget https://github.com/pytorch/pytorch/releases/download/v1.13.1/pytorch-v${TORCH_VERSION}.tar.gz\ntar -xf pytorch-v${TORCH_VERSION}.tar.gz\n\n# Make a virtual env\nconda create --name torch python=3.10 pyyaml typing_extensions\nconda activate torch\n\n# compile\nmkdir libtorch build \u0026\u0026 cd build\ncmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=`which python3` -DCMAKE_INSTALL_PREFIX:PATH=../libtorch -USE_MPS=ON ../pytorch-v${TORCH_VERSION}\ncmake --build . --target install\n```\n\nNow `temp/pytorch/libtorch` should be like\n\n```sh\n$ tree -L 1 temp/pytorch/libtorch\ntemp/pytorch/libtorch\n├── bin\n├── include\n├── lib\n└── share\n```\n\n### Download JUCE\n\nDownload [JUCE](https://juce.com/download/) and unzip to a folder, e.g. `temp/JUCE`\n\n```sh\n$ tree -L 1 temp/juce/JUCE\ntemp/juce/JUCE\n├── BREAKING-CHANGES.txt\n├── CMakeLists.txt\n├── ChangeList.txt\n├── DemoRunner.app\n├── LICENSE.md\n├── Projucer.app\n├── README.md\n├── docs\n├── examples\n├── extras\n└── modules\n```\n\n### Build and run and test\n\nConfigure with CMake\n\n```sh\n$ cmake -B build -DTORCH_DIR=\u003cTORCH_DIR\u003e -DJUCE_DIR=\u003cJUCE_DIR\u003e\n-- The C compiler identification is AppleClang 13.1.6.13160021\n-- The CXX compiler identification is AppleClang 13.1.6.13160021\n-- Detecting C compiler ABI info\n-- Detecting C compiler ABI info - done\n-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped\n-- Detecting C compile features\n-- Detecting C compile features - done\n-- Detecting CXX compiler ABI info\n-- Detecting CXX compiler ABI info - done\n-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped\n-- Detecting CXX compile features\n-- Detecting CXX compile features - done\n-- Performing Test CMAKE_HAVE_LIBC_PTHREAD\n-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success\n-- Found Threads: TRUE\n-- Found Torch: temp/pytorch/libtorch/lib/libtorch.dylib\n-- Configuring juceaide\n-- Building juceaide\n-- Exporting juceaide\n-- Performing Test HAVE_FLAG__ffile_prefix_map__Users__projects_juce_libtorch_build__deps_catch2_src__\n-- Performing Test HAVE_FLAG__ffile_prefix_map__Users__projects_juce_libtorch_build__deps_catch2_src__ - Success\n-- Configuring done\n-- Generating done\n-- Build files have been written to:\n```\n\nBuild the project\n\n```sh\n$ cd build\n$ cmake --build .\n```\n\nRun the build target\n\n```sh\n$  src/main_artefacts/main\nHello JUCE!\n```\n\nrun unit test\n\n```sh\n$ ctest\nTest project juce-libtorch/build\n    Start 1: libtorch\n1/1 Test #1: libtorch .........................   Passed    0.39 sec\n\n100% tests passed, 0 tests failed out of 1\n\nTotal Test time (real) =   0.40 sec\n```\n\n## References\n\n- [sudara/pamplejuce: A JUCE Plugin CI template. JUCE 7 \u0026 Catch2 with macOS notarization and Windows EV code signing on Github Actions](https://github.com/sudara/pamplejuce)\n- [microsoft/vscode-cmake-tools: CMake integration in Visual Studio Code](https://github.com/microsoft/vscode-cmake-tools)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstwind%2Fjuce-libtorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstwind%2Fjuce-libtorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstwind%2Fjuce-libtorch/lists"}