# RemoteRF Host (hostrf) — Ubuntu Setup

This guide installs Miniconda, creates a conda environment named `hostrf`, installs dependencies, and verifies the install on Ubuntu. (should work on any linux kernel).

<!-- ---

## Tested Platforms

- Ubuntu 20.04 / 22.04 / 24.04
- Architecture: x86_64 (Intel/AMD)
  - If you are on ARM64 (aarch64), use the ARM Miniconda installer (see below).

--- -->

## Quickstart (Ubuntu)

```bash
set -e

# 0) System prereqs
sudo apt update
sudo apt install -y curl ca-certificates bzip2 git build-essential libusb-1.0-0 udev

# 1) Install Miniconda (x86_64) to ~/miniconda3 (non-interactive)
cd /tmp
curl -fsSLO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p "$HOME/miniconda3"

# Make conda available in this shell session
source "$HOME/miniconda3/etc/profile.d/conda.sh"

# 2) Create environment.yml (in current directory)
cat > environment.yml <<'EOF'
name: hostrf
channels:
  - conda-forge
  - defaults

dependencies:
  - python=3.10
  - pip
  - setuptools
  - wheel

  - grpcio
  - protobuf
  - python-dotenv

  - numpy
  - scipy

  - libiio
  - pylibiio
  - libusb

  - pip:
      - pyadi-iio
      - remoterf-host
EOF

# 3) Create + activate environment
conda env create -f environment.yml
conda activate hostrf

# 4) Verify install
python --version
python -c "import grpc, google.protobuf, dotenv, numpy, scipy; print('core deps ok')"
python -c "import iio; import adi; print('iio + pyadi-iio ok')"
python -c "import remoteRF_host; print('remoterf-host ok')"

echo "Done. Environment 'hostrf' is ready."
