# Installation

Channel: release; package: 1.8.0; source: 7d1e97331656dd74ad0f5471653ac0c5effdff70

Page: https://remilab.ai/rfx/versions/v1.8.0/guide/installation/
Source: https://github.com/bk-squared/rfx/blob/7d1e97331656dd74ad0f5471653ac0c5effdff70/docs/public/guide/installation.mdx

## Basic install

```bash
pip install rfx-fdtd
```

`rfx` requires Python 3.10+ and installs JAX, NumPy, SciPy, matplotlib, and
h5py.

The package name on PyPI is `rfx-fdtd`, while the Python import remains:

```python
import rfx
```

For the packaged local Studio, background experiment CLI, and Model Context
Protocol (MCP) server, install the Studio extra:

```bash
pip install "rfx-fdtd[studio]"
rfx studio --workspace .rfx-studio
```

See [Studio, CLI, and MCP Experiments](https://remilab.ai/rfx/versions/v1.8.0/guide/studio-experiments/) for the
current UI scope, shared-workspace rules, replay, approvals, and remote
deployment requirements.

## Verify your install

After installing, confirm the environment can actually run a simulation.

First run the bundled diagnostics command:

```bash
rfx-diagnose
```

It prints a PASS / WARN / FAIL report (Python and rfx versions, the JAX
backend and devices, core dependencies, optional extras) and finishes with a
tiny end-to-end FDTD run. It exits `0` only when every critical check
passes; WARN lines (CPU-only backend, x64 disabled) are informational.
An x64-disabled warning is harmless for the default `precision="float32"`
workflow, but `precision="float64"` requires JAX x64 to be enabled before the
simulation is constructed. Both `"float64"` and `"mixed"` are limited to the
uniform single-device lane. Mixed precision works with CPML but raises the
absorber residual floor, so use float32 for low-reflection and S-parameter
work near that floor.

The diagnostic's final short run is the installed-package execution check.
Examples under `examples/` are available only from a source checkout; they are
not installed as wheel data.

## GPU support

```bash
pip install --upgrade "jax[cuda12]"
python -c "import jax; print(jax.devices())"
```

See the official JAX installation guide for CUDA/cuDNN details.

## Development install

```bash
git clone https://github.com/bk-squared/rfx.git
cd rfx
pip install -e ".[dev]"
python examples/quickstart/hello_world.py
```

The hello-world script builds a tiny box, injects one pulse, records one field
probe, and prints a short finite-data summary.

The `dev` extra includes:

- `pytest`
- `pytest-xdist`
- `ruff`

## System requirements

- Python: 3.10 / 3.11 / 3.12
- CPU: modern x86_64
- GPU: NVIDIA + CUDA 12+ for acceleration
- RAM: 4 GB minimum, 16 GB+ recommended for larger 3D runs

## Next steps

From a source checkout with the development install above, run
`examples/quickstart/hello_world.py`, then follow the ordered tutorials in
`examples/tutorials/`; `examples/README.md` lists the sequence. For a wheel-only
install, use `rfx-diagnose` as the execution check because the wheel does not
include `examples/`.
