# Installation<no value>
Thank you for considering Adaptyst! **Please note that the current version is in an early development phase,
which means that updates are deployed often, API stability is not guaranteed\*, and bugs are to be expected.**
Your feedback is very welcome as it will help guide our development efforts.

*\*We try to keep our APIs as stable as possible already now. ~~All breaking changes are announced in advance.~~
If there are breaking changes in a new update, they are announced at the release time or earlier (**it's unfortunately
difficult to anticipate these changes in advance at the moment**). If you use Adaptyst / Adaptyst Analyser APIs,
[let us know](/contact): by staying in touch with us, we can ensure that the impact of any API changes on
your work is minimised.*

To get started, you need to set up:
* [Adaptyst](#adaptyst)
* Software for inspecting results produced by Adaptyst. We recommend our dedicated tool
[Adaptyst Analyser](#adaptyst-analyser).
* At least one system/hardware module for Adaptyst (and for Adaptyst Analyser if you use it).
You can start with our modules, see the "Modules from Adaptyst team" section of [the docs](/docs/intro/welcome).

## Adaptyst

**The full source code of Adaptyst can be found on GitHub: [https://github.com/adaptyst/adaptyst](https://github.com/adaptyst/adaptyst).**

### Requirements
To use Adaptyst, you need:
* [PocoNet + PocoFoundation](https://pocoproject.org) (tested with 1.14.2)
* [Boost](https://www.boost.org) (header-only libraries along with the ```program_options``` and ```process``` modules, tested with 1.88.0)
* [libarchive](https://github.com/libarchive/libarchive) (tested with 3.8.1)

If you build from source, you **also** need:
* CMake 3.20 or newer
* [CLI11](https://github.com/CLIUtils/CLI11) (tested with 2.5.0)
* [nlohmann-json](https://github.com/nlohmann/json) (tested with 3.12.0)

{{< callout context="caution" title="Development headers" icon="outline/alert-triangle" >}}
If you build from source, development headers of the dependencies above should also be installed! Otherwise, the compilation may fail.

(The headers of CMake are **not** needed.)
{{< /callout >}}

The tested dependency versions are a guideline only, Adaptyst may compile and run without issues with older versions (there have been problems with some older versions of nlohmann-json, CLI11, and libarchive though). However, it is recommended to use the newest versions available for your distribution (or for installing from source if distribution versions don't solve e.g. compilation errors).

<!-- If you want to enable tests (see the documentation for contributors), you don't have to install [the GoogleTest framework](https://github.com/google/googletest) beforehand, this is done automatically during the compilation. -->

### Pre-built binaries
{{< callout context="note" title="Pre-built binaries coming soon" icon="outline/info-circle" >}}
We are switching the intermediate representation used by Adaptyst from SDFGs to MLIR. Once this is finalised,
the pre-built binaries will become available. Sorry for any inconvenience caused!

See [What is Adaptyst?](/docs/adaptyst/what-is-adaptyst) for the context.
{{< /callout >}}

### Container images
To ease the deployment of Adaptyst, we also provide Docker and Apptainer/Singularity images. **x86-64 only is available at the moment**, with more architectures coming soon
when the MLIR integration is finalised.

{{< callout context="note" title="Adaptyst Analyser" icon="outline/info-circle" >}}
The container images **do not have Adaptyst Analyser**! It can be installed later as a Python package.
{{< /callout >}}

There are two Adaptyst container variants:
* Gentoo (default): based on Gentoo with everything compiled with frame pointers and debug symbols.
* AlmaLinux 10: based on AlmaLinux 10, where the frame-pointer-enabled environment is by default.

#### Docker
Please use:
* ```gitlab-registry.cern.ch/adaptyst/adaptyst:latest``` for the latest development version.
* ```gitlab-registry.cern.ch/adaptyst/adaptyst:<git tag>``` for a development version of your choice as indicated by a git tag (see [here](https://github.com/Adaptyst/Adaptyst/tags) for the tag list; older tags may no longer be available as a Docker image though).

If you want to use the AlmaLinux 10 variant, use any of the tags above prefixed by ```alma10-``` (e.g. ```gitlab-registry.cern.ch/adaptyst/adaptyst:alma10-latest```).

All images are public (no CERN login required), so no deployment to a non-CERN registry is planned.

#### Apptainer/Singularity
The images are denoted by development versions as indicated by git tags (see [here](https://github.com/Adaptyst/Adaptyst/tags) for the tag list; older tags may no longer be available as an Apptainer/Singularity image though) and can be downloaded from [https://cernbox.cern.ch/s/XVwsHPOjvyb2YpU](https://cernbox.cern.ch/s/XVwsHPOjvyb2YpU). Similarly to the Docker images, the AlmaLinux 10 variant is prefixed by ```alma10-``` there.

### From source
**Short version:**
```bash
git clone -b v0.1.0-dev.2026.07a https://github.com/adaptyst/adaptyst
cd adaptyst && mkdir build && cd build
cmake ..
cmake --build .
sudo cmake --install .
```

**Long version:**

Please clone [the GitHub repository](https://github.com/adaptyst/adaptyst) at the tag of your choice (it's usually the newest one from [here](https://github.com/Adaptyst/Adaptyst/releases)) and run ```cmake <path to your repository>``` **in a separate directory** (as either non-root or root, non-root recommended) followed by ```cmake --build .``` (as either non-root or root, non-root recommended) and ```cmake --install .``` (as root unless you run the installation for a non-system prefix).

By default, the installation directory of Adaptyst is determined by CMake (e.g. ```/usr/local```), but its support files are installed in ```/opt/adaptyst```, its module directory is set as ```/opt/adaptyst/modules```, and the configuration file of Adaptyst is installed in ```/etc/adaptyst.conf```.

* If you want to specify the installation directory, you can run CMake with ```-DCMAKE_INSTALL_PREFIX=<path>``` or run ```cmake --install . --prefix <path>```.
* If you want to change ```/opt/adaptyst```, run CMake with ```-DADAPTYST_MISC_PATH=<path>```.
* If you want to change ```/opt/adaptyst/modules```, run CMake with ```-DADAPTYST_MODULE_PATH=<path>```.
* If you want to change ```/etc/adaptyst.conf```, run CMake with ```-DADAPTYST_CONFIG_PATH=<path including the filename>```.

Please note that the ```/opt/adaptyst```, ```/opt/adaptyst/modules```, and ```/etc/adaptyst.conf``` paths can also be varied at runtime through the environment variables, see [here](/docs/adaptyst/running-adaptyst/#configuration-files).


## Adaptyst Analyser

**The full source code of Adaptyst Analyser can be found on GitHub: [https://github.com/adaptyst/adaptyst-analyser](https://github.com/adaptyst/adaptyst-analyser).**

### Requirements
Python 3.8 or newer. All other dependencies are installed automatically when setting up Adaptyst Analyser.

### Setup
This is a Python package, so you can install it with ```pip```:
```bash
pip install git+https://github.com/adaptyst/adaptyst-analyser@v0.1.0.dev6
```

You can also pick a different tag if you know what you're doing, see [here](https://github.com/Adaptyst/adaptyst-analyser/tags) for the list.

#### Windows
At the moment, Adaptyst Analyser can be installed only on Unix-like systems such as Linux and macOS. Because these should also include [WSL (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/install), you should still be able to use the tool on Windows, with extra steps needed to set up WSL.

## Getting started
Once again, welcome to Adaptyst! Click [here](/docs/intro/quick-start) to open our quick start guide.
