2023-07-17 19:28:43 +01:00
|
|
|
.. only:: comment
|
|
|
|
|
|
2025-01-02 15:05:06 +00:00
|
|
|
© Crown-owned copyright 2025, Defence Science and Technology Laboratory UK
|
2023-07-17 19:28:43 +01:00
|
|
|
|
2023-07-11 15:47:13 +01:00
|
|
|
.. _getting-started:
|
2023-07-07 11:37:57 +01:00
|
|
|
|
|
|
|
|
Getting Started
|
2023-07-11 15:47:13 +01:00
|
|
|
===============
|
|
|
|
|
|
|
|
|
|
**Getting Started with PrimAITE**
|
|
|
|
|
|
|
|
|
|
Pre-Requisites
|
|
|
|
|
|
2024-03-15 13:42:59 +00:00
|
|
|
In order to get **PrimAITE** installed, you will need Python, venv, and pip. If you don't already have them, this is how to install it:
|
2023-07-11 15:47:13 +01:00
|
|
|
|
|
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
|
|
|
|
sudo apt install python3.10
|
|
|
|
|
sudo apt-get install python3-pip
|
|
|
|
|
sudo apt-get install python3-venv
|
2023-07-11 15:47:13 +01:00
|
|
|
|
|
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: text
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
- Manual install from: https://www.python.org/downloads/release/python-31011/
|
2023-07-11 15:47:13 +01:00
|
|
|
|
|
|
|
|
**PrimAITE** is designed to be OS-agnostic, and thus should work on most variations/distros of Linux, Windows, and MacOS.
|
|
|
|
|
|
2024-03-15 13:42:59 +00:00
|
|
|
Installing PrimAITE has been tested with all supported python versions, venv 20.24.1, and pip 23.
|
|
|
|
|
|
2023-07-11 15:47:13 +01:00
|
|
|
Install PrimAITE
|
2023-07-07 11:37:57 +01:00
|
|
|
****************
|
|
|
|
|
|
2023-10-25 23:32:52 +01:00
|
|
|
1. Create a directory for your PrimAITE project:
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
|
|
|
|
|
2024-03-14 23:17:34 +00:00
|
|
|
mkdir -p ~/primaite/{VERSION}
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2024-03-14 23:17:34 +00:00
|
|
|
mkdir ~\primaite\{VERSION}
|
2023-07-07 11:37:57 +01:00
|
|
|
|
|
|
|
|
|
2023-10-25 23:32:52 +01:00
|
|
|
2. Navigate to the primaite directory and create a new python virtual environment (venv)
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
|
|
|
|
|
2024-03-14 23:17:34 +00:00
|
|
|
cd ~/primaite/{VERSION}
|
2023-08-03 16:04:23 +01:00
|
|
|
python3 -m venv .venv
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2024-03-15 13:13:54 +00:00
|
|
|
cd ~\primaite\{VERSION}
|
2023-07-11 15:47:13 +01:00
|
|
|
python3 -m venv .venv
|
|
|
|
|
attrib +h .venv /s /d # Hides the .venv directory
|
|
|
|
|
|
|
|
|
|
|
2023-10-25 23:32:52 +01:00
|
|
|
3. Activate the venv
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
source .venv/bin/activate
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.\.venv\Scripts\activate
|
2023-07-11 15:47:13 +01:00
|
|
|
|
|
|
|
|
|
2023-10-25 23:32:52 +01:00
|
|
|
4. Install PrimAITE from your saved wheel file
|
|
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
|
|
|
|
|
2024-05-29 14:54:45 +01:00
|
|
|
pip install path/to/your/primaite.whl[rl]
|
2023-10-25 23:32:52 +01:00
|
|
|
|
|
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
|
|
|
|
|
|
|
|
|
pip install path\to\your\primaite.whl
|
|
|
|
|
|
2023-11-23 16:19:39 +00:00
|
|
|
5. Perform the PrimAITE setup
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
primaite setup
|
2023-07-11 15:47:13 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-11 15:47:13 +01:00
|
|
|
|
|
|
|
|
primaite setup
|
|
|
|
|
|
|
|
|
|
Clone & Install PrimAITE for Development
|
|
|
|
|
****************************************
|
|
|
|
|
|
|
|
|
|
To be able to extend PrimAITE further, or to build wheels manually before install, clone the repository to a location
|
|
|
|
|
of your choice:
|
|
|
|
|
|
2024-05-31 18:50:56 +01:00
|
|
|
1. Clone the repository.
|
2024-05-31 13:55:20 +01:00
|
|
|
|
|
|
|
|
For example:
|
2023-10-25 23:32:52 +01:00
|
|
|
|
2023-07-11 15:47:13 +01:00
|
|
|
.. code-block:: bash
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2024-06-25 11:04:52 +01:00
|
|
|
git clone https://github.com/{todo:fill in URL}/PrimAITE
|
2023-07-11 15:47:13 +01:00
|
|
|
cd primaite
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-10-25 23:32:52 +01:00
|
|
|
2. Create and activate your Python virtual environment (venv)
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
2023-07-10 10:01:25 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
python3 -m venv venv
|
|
|
|
|
source venv/bin/activate
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
python3 -m venv venv
|
|
|
|
|
.\venv\Scripts\activate
|
2023-07-10 10:01:25 +01:00
|
|
|
|
2023-10-25 23:32:52 +01:00
|
|
|
3. Install PrimAITE with the dev extra
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
2023-07-07 11:37:57 +01:00
|
|
|
|
2024-05-29 14:54:45 +01:00
|
|
|
pip install -e .[dev,rl]
|
2023-07-07 16:25:55 +01:00
|
|
|
|
2023-08-03 16:04:23 +01:00
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
2023-07-11 13:49:01 +01:00
|
|
|
|
2024-05-29 14:54:45 +01:00
|
|
|
pip install -e .[dev,rl]
|
2023-07-11 13:49:01 +01:00
|
|
|
|
2023-07-11 15:47:13 +01:00
|
|
|
To view the complete list of packages installed during PrimAITE installation, go to the dependencies page (:ref:`Dependencies`).
|
2024-04-25 13:50:41 +01:00
|
|
|
|
|
|
|
|
4. Set PrimAITE to run on development mode
|
|
|
|
|
|
|
|
|
|
Running step 3 should have installed PrimAITE, verify this by running
|
|
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
|
|
|
|
|
|
|
|
|
primaite setup
|
|
|
|
|
|
|
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
|
|
|
|
|
|
|
|
|
primaite setup
|
|
|
|
|
|
|
|
|
|
To set PrimAITE to run in development mode:
|
|
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
:caption: Unix
|
|
|
|
|
|
2024-04-29 13:45:10 +01:00
|
|
|
primaite dev-mode enable
|
2024-04-25 13:50:41 +01:00
|
|
|
|
|
|
|
|
.. code-block:: powershell
|
|
|
|
|
:caption: Windows (Powershell)
|
|
|
|
|
|
2024-04-29 13:45:10 +01:00
|
|
|
primaite dev-mode enable
|
2024-05-01 16:04:18 +01:00
|
|
|
|
|
|
|
|
More information about :ref:`Developer Tools`
|