Reputation: 1
I want to install kaldi on the server, when I run the check_dependencies.sh, it tells me that I should install gfortran, but I'm not allowed to use sudo.
I have tried to install gfortran from anaconda, but it only shows that gfortran is not available from current channels, even though I had updated my conda.
Is there any alternative way? thanks!!
Upvotes: 0
Views: 2288
Reputation: 77098
I typically use the conda-forge::compilers
package for my compilation needs. It includes C, C++, and FORTRAN, and abstracts over the platform (i.e., provides equivalent compilers for osx-64, linux-64, etc.).
In this particular case, the following environment appears sufficient to compile Kaldi:
kaldi-compile.yaml
name: kaldi-compile
channels:
- conda-forge
dependencies:
- compilers # this covers C, C++, and FORTRAN
- make
- cmake
- icu
- openblas # `mkl` could be used instead
Tested this works in the Mambaforge container:
docker run --rm -it condaforge/mambaforge bash
With:
Docker Session
## create env
mamba create -yn kaldi-compile compilers make cmake icu openblas
## activate env
conda activate kaldi-compile
## basic install instructions
cd /home
git clone https://github.com/kaldi-asr/kaldi.git kaldi --origin upstream
mkdir -p kaldi/build && cd kaldi/build
## configure, build, install
cmake -DCMAKE_INSTALL_PREFIX=../dist ..
cmake --build . --target install -- -j8
Upvotes: 1
Reputation: 60088
You can easily install GCC in your home directory without any root or admin rights.
Just download the source (e.g. a snapshot of your choice), run the provided ./contrib/download_prerequisites
and than the holy trio configure --prefix=$HOME --enable-languages=c,c++,fortran
, make
, make install
.
I recommend running these in a different directory. In general, just follow https://gcc.gnu.org/wiki/InstallingGCC A full example of a possible sequence of commands is at the bottom of the page.
Upvotes: 2