{"id":18439572,"url":"https://github.com/idiap/buslr","last_synced_at":"2025-09-12T00:38:51.559Z","repository":{"id":136633290,"uuid":"210294545","full_name":"idiap/buslr","owner":"idiap","description":"BuSLR: Build System for Speech and Language Research","archived":false,"fork":false,"pushed_at":"2020-12-04T09:09:57.000Z","size":111,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-04T07:57:11.873Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idiap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2019-09-23T07:44:54.000Z","updated_at":"2020-12-04T09:10:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe4c1e7b-3a19-488f-b042-97c12f857c29","html_url":"https://github.com/idiap/buslr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idiap/buslr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbuslr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbuslr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbuslr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbuslr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idiap","download_url":"https://codeload.github.com/idiap/buslr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbuslr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274732454,"owners_count":25339345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-06T06:25:29.435Z","updated_at":"2025-09-12T00:38:51.541Z","avatar_url":"https://github.com/idiap.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build System for Learning Research\n\n## Overview\n\nBuSLR knows about various packages that are useful for machine learning (originally speech and language processing), and how to go get them and build them.  BuSLR supports two build\nsystems:\n\n - One is built around [cmake](https://cmake.org)'s\n[ExternalProject](https://cmake.org/cmake/help/latest/module/ExternalProject.html)\npackage.  It uses make dependencies to handle package dependencies.\n - The other is built around [conda](http://conda.io).  It functions as a\n   repository for conda's `meta.yaml` and `build.sh` metadata.\n\nNot all packages are supported in both systems.\n \nThere is an aspect of balance between the wider [conda](http://conda.io)\ninfrastructure and the linux distribution packaging systems.  In general, if\nsomething is normally in a linux distribution (e.g.,\n[sox](http://sox.sourceforge.net)) then there's no point handling it here.  If\nit's in `conda` then the same argument applies, but more subjectively.\n[pytorch](https://pytorch.org) is better in conda,\n[kaldi](http://kaldi-asr.org) perhaps not.\n\nAlso, with conda, bear in mind that [this](https://xkcd.com/1987/) is not a\njoke; the thing marked \"another PIP?\" does exist.\n\n## To use cmake\n\nClone the repo and do\n```\ncd buslr/local\ncp Configure.example configure.sh # Edit if necessary\n./configure.sh\nmake \u003cpackage name\u003e\n```\nThe package is built in `local` and installed to `local` unless the appropriate\nline in `configure.sh` is changed.  You can set:\n```\nexport PATH=\u003cpath-to-buslr\u003e/local/bin\n```\nto access the builds, or do `source \u003cpath-to-buslr\u003e/local/etc/buslrvars.sh` to set other appropriate variables too.  Set the `INHIBIT` line in `configure.sh` to inhibit building of packages for which you might have a system version (typically `cuda` or `mkl`).\n\n## To use conda\n\nClone the repo and do\n```\ncd buslr\nconda build src/\u003cpackage name\u003e\n```\nAs long as the `conda-bld` directory is on your channel list (it is indexed and\nfunctions as a local channel), you can do this:\n```\nconda install \u003cpackage name\u003e\nconda build purge\n```\n\nMany of the packages were initialised with this command\n```\nconda-skeleton pypi \u003cname-of-pip-package\u003e\n```\nIt allows conda versions of PIP packages to be built, thus avoiding the problem\nwith muliple PIPs and conda being unaware of PIP.\n\n## Some individual package instructions\n\n* [HTS](src/hts/README) requires the HTK sources to be downloaded manually.\n* SRILM also requires a manual download\n* Some packages (festival, kaldi, SRILM) don't really support a `make install`.\n  See the in-place build section below.\n\n## Guidelines for creating new packages\n\n### Packages\n\nThere is a directory for each package.  Typically there are only\n`CMakeLists.txt` and `meta.yaml` files, but there can also be patched or whole\nfiles to be copied into the tree.  In the case of HTS and SRILM, the manually\ndownloaded files are placed there too.\n\n### Patches\n\nFollowing the man page for `patch`, patches can be generated by copying the\noriginal file to `\u003cpath-to\u003e/\u003cfile\u003e.org`, modifying the file, then running\n```\ndiff -Naur \u003cpath-to\u003e/\u003cold-file\u003e \u003cpath-to\u003e/\u003cnew-file\u003e\n```\nThis is typically run relative to a directory called\n`package/package-prefix/src/package`.  At patch time, cmake will cd to that\ndirectory.  The patch can be applied using\n```\nPATCH_COMMAND     patch -p0 \u003c ${CMAKE_CURRENT_SOURCE_DIR}/patch.txt\n```\nin the `CMakeLists.txt` file.  A precedent for this is the [sctk](sctk)\npackage, which patches the installation directory of a deep makefile.\n\nIf there are multiple patched files, it's better to run it on a copy of the\nwhole directory.  In this case, it will prepend a directory so we need `patch\n-p1`.\n\nIf the package is git based then git can generate the patch using `git diff`.\nIt functions like the directory case, so `patch -p1`.  However patching git\ncheckouts causes problems on updates; see `irstlm`.\n\nWhere a package doesn't even have a build system, a `cmake` file can be copied\ndirectly into the tree.  This approach is taken in `sph2pipe`.\n\n### Installing using CMake\n\nSome packages don't have an install step.  The native CMake install can work\nwell in these cases.  CMake's `install()` command actually writes things to a\nfile called `cmake_install.cmake`.  The trick is to use this file as the\n`INSTALL_COMMAND` for these cases.  The simplest precedent is `libresample`.\nSo, define this:\n```\nset(CMAKE_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake)\n```\nadd this command\n```\nINSTALL_COMMAND   ${CMAKE_COMMAND} -P ${CMAKE_INSTALL_SCRIPT}\n```\nand specify the files using `install(FILES \u003cfiles\u003e DESTINATION \u003cwhere\u003e)`.\n\n### In-place builds\n\nSome packages, notably `kaldi` and the `festvox` family, don't really support being installed.  For these, we set `SOURCE_DIR` to something at top level (rather than buried in the `src` tree) and set `INSTALL_COMMAND true` to suppress installation.  `true` here is the unix command that returns 1; empty strings don't survive the `BuSLR_Add` wrapper.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fbuslr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidiap%2Fbuslr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fbuslr/lists"}