clarify cmake install and check for it in setup script

This commit is contained in:
nckcard
2025-07-02 22:28:07 -07:00
parent 5d040c4e1c
commit 306a473568
3 changed files with 14 additions and 1 deletions

View File

@@ -66,7 +66,7 @@ Please download these datasets from [Dryad](https://datadryad.org/stash/dataset/
```
- Turn off autorestarting for the redis server in terminal:
- `sudo systemctl disable redis-server`
- `CMake >= 3.14` and `gcc >= 10.1` are required for the ngram language model installation. You can install these on linux with `sudo apt-get install build-essential`.
- `CMake >= 3.14` and `gcc >= 10.1` are required for the ngram language model installation. You can install these on linux with `sudo apt-get install cmake` and `sudo apt-get install build-essential`.
## Python environment setup for model training and evaluation
To create a conda environment with the necessary dependencies, run the following command from the root directory of this repository:

View File

@@ -10,6 +10,7 @@ pytorch == 1.13.1
To install CMake and gcc on Ubuntu, simply run:
```bash
sudo apt-get install build-essential
sudo apt-get install cmake
```
# Install language model python package

View File

@@ -18,6 +18,18 @@ if [ -d "language_model/runtime/server/x86/fc_base" ]; then
exit 1
fi
# make sure CMake is installed
if ! command -v cmake &> /dev/null; then
echo "CMake is not installed. Please install CMake >= 3.14 before running this script with 'sudo apt-get install cmake'."
exit 1
fi
# make sure gcc is installed
if ! command -v gcc &> /dev/null; then
echo "GCC is not installed. Please install GCC >= 10.1 before running this script with 'sudo apt-get install build-essential'."
exit 1
fi
# Ensure conda is available
source "$(conda info --base)/etc/profile.d/conda.sh"