|
1 | 1 | #!/bin/bash |
2 | | -echo "Checking dependencies..." |
| 2 | +#!/bin/bash |
| 3 | +# Install system dependencies required to build Sirius and run ClickBench. |
3 | 4 |
|
4 | | -# DuckDB dependencies |
| 5 | +echo "Installing system dependencies..." |
5 | 6 | sudo apt-get update -y |
6 | | -sudo apt-get install -y git g++ ninja-build libssl-dev build-essential make ccache pip |
7 | | - |
8 | | -# CMake |
9 | | -CMAKE_REQUIRED_VERSION="3.30.4" |
10 | | -if command -v cmake &>/dev/null; then |
11 | | - CMAKE_INSTALLED_VERSION=$(cmake --version | head -n1 | awk '{print $3}') |
12 | | -else |
13 | | - CMAKE_INSTALLED_VERSION="0" |
14 | | -fi |
15 | | - |
16 | | -version_lt() { |
17 | | - [ "$(printf '%s\n%s\n' "$1" "$2" | sort -V | head -n1)" != "$2" ] |
18 | | -} |
19 | | - |
20 | | -if version_lt "$CMAKE_INSTALLED_VERSION" "$CMAKE_REQUIRED_VERSION"; then |
21 | | - echo "CMake version too old, installing version $CMAKE_REQUIRED_VERSION..." |
22 | | - sudo apt purge --autoremove -y cmake |
23 | | - wget -qO- "https://github.com/Kitware/CMake/releases/download/v$CMAKE_REQUIRED_VERSION/cmake-$CMAKE_REQUIRED_VERSION.tar.gz" | tar -xz |
24 | | - cd "cmake-$CMAKE_REQUIRED_VERSION" |
25 | | - ./bootstrap |
26 | | - make -j$(nproc) |
27 | | - sudo make install |
28 | | - cd .. |
29 | | - rm -rf "cmake-$CMAKE_REQUIRED_VERSION" |
30 | | -fi |
| 7 | +sudo apt-get install -y git wget curl build-essential time |
31 | 8 |
|
32 | | -# CONDA |
33 | | -MINICONDA_DIR="$HOME/miniconda3" |
34 | | -if [[ ! -d "$MINICONDA_DIR" ]]; then |
35 | | - echo "Miniconda not found. Installing..." |
36 | | - ARCH=$(uname -m) |
37 | | - if [[ "$ARCH" == "x86_64" ]]; then |
38 | | - MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" |
39 | | - elif [[ "$ARCH" == "aarch64" ]]; then |
40 | | - MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh" |
41 | | - else |
42 | | - echo "Unsupported architecture for Miniconda: $ARCH" |
43 | | - exit 1 |
44 | | - fi |
45 | | - wget -q $MINICONDA_URL -O /tmp/Miniconda3-latest.sh |
46 | | - bash /tmp/Miniconda3-latest.sh -b -p $HOME/miniconda3 |
47 | | - rm /tmp/Miniconda3-latest.sh |
| 9 | +# Install Pixi package manager (used to manage CUDA/cuDF toolchain) |
| 10 | +if ! command -v pixi &> /dev/null; then |
| 11 | + echo "Pixi not found. Installing..." |
| 12 | + curl -fsSL https://pixi.sh/install.sh | sudo PIXI_BIN_DIR=/usr/local/bin PIXI_NO_PATH_UPDATE=1 bash |
48 | 13 | fi |
49 | | -source "$MINICONDA_DIR/etc/profile.d/conda.sh" |
50 | 14 |
|
51 | | -# Accept ToS for non-interactive use |
52 | | -conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main |
53 | | -conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r |
54 | | - |
55 | | -# CUDF |
56 | | -CUDF_REQUIRED_VERSION="25.12" |
57 | | -CUDF_NIGHTLY=true |
58 | | -CONDA_CUDF_ENV_NAME="libcudf-env" |
59 | | -CONDA_BASE=$(conda info --base) |
60 | | -export LIBCUDF_ENV_PREFIX="$CONDA_BASE/envs/$CONDA_CUDF_ENV_NAME" |
61 | | - |
62 | | -check_libcudf_version() { |
63 | | - conda list --prefix "$1" 2>/dev/null | grep "^libcudf" | awk '{print $2}' |
64 | | -} |
65 | | -CUDF_INSTALLED_VERSION=$(check_libcudf_version "$LIBCUDF_ENV_PREFIX" || echo "") |
66 | | - |
67 | | -if [[ ! -d "$LIBCUDF_ENV_PREFIX" ]]; then |
68 | | - echo "Creating conda environment $CONDA_CUDF_ENV_NAME..." |
69 | | - conda create --name "$CONDA_CUDF_ENV_NAME" -y |
70 | | -fi |
71 | | -conda activate "$CONDA_CUDF_ENV_NAME" |
72 | | - |
73 | | -if [[ "$CUDF_INSTALLED_VERSION" != "$CUDF_REQUIRED_VERSION" ]]; then |
74 | | - echo "Installing/upgrading libcudf $CUDF_REQUIRED_VERSION..." |
75 | | - if [[ "$CUDF_NIGHTLY" = true ]]; then |
76 | | - conda install -c rapidsai -c conda-forge -c nvidia "rapidsai-nightly::libcudf=$CUDF_REQUIRED_VERSION" -y |
77 | | - else |
78 | | - conda install -c rapidsai -c conda-forge -c nvidia "rapidsai::libcudf=$CUDF_REQUIRED_VERSION" -y |
79 | | - fi |
80 | | -fi |
| 15 | +echo "All dependencies installed." |
0 commit comments