Setting up MaRGE and MaRCoS from scratch (Windows) - josalggui/MaRGE GitHub Wiki

MaRGE and MaRCoS installation from scratch (Windows)

Index

  1. Requirements
    1. Software requirements
    2. Hardware and Network requirements
  2. Set up MaRGE
    1. Install MaRGE from PyPI
    2. Install MaRGE from source
    3. Minimal Hardware Configuration
  3. Guided set up of MaRCoS Server, MaRCoS Client, and Tyger (Only for Ubuntu)
  4. Set up MarCoS Server
  5. Set up Client
    1. Configure a static IP address
    2. Set up Tyger

1. Requirements

i. Software Requirements

Component Requirement Level Tested Version(s) Notes
Operating System Required Windows 10, Windows 11 Officially tested platforms
Python Required 3.12, 3.13, 3.14 Other Python 3 versions may work but have not been tested
pip Required Included with tested Python versions Required for installing Python packages
venv Required Included with tested Python versions Required for creating virtual environments
Git for Windows Required Any recent version Required for cloning repositories and installing some dependencies
Git Bash Recommended Included with Git for Windows Recommended terminal for running the commands described in this wiki

Install Python from the official Python website:

https://www.python.org/downloads/windows/

During installation, enable the option:

Add python.exe to PATH

Install Git for Windows from:

https://git-scm.com/download/win

Git Bash is installed together with Git for Windows and is the recommended terminal for this setup.

After installing Python and Git, open Git Bash and check that both are available:

python --version
pip --version
git --version

Create and activate a virtual environment using Git Bash:

python -m venv venv
source venv/Scripts/activate

After activation, the terminal prompt should show the active virtual environment.


ii. Hardware and Network Requirements

Component Status Notes
Red Pitaya board Required Target hardware for MaRGE
MicroSD card Required Used to flash and boot the Red Pitaya image
Ethernet port Required Available Ethernet port on the host computer
Ethernet connection Required Dedicated connection between the host computer and the Red Pitaya
Internet connection Required during installation Needed to download dependencies and complete the setup process

2. Set up MaRGE

i. Install MaRGE from PyPI

MaRGE is available on PyPI, making it easy to install with pip. This option is ideal for users who want to use the existing sequences and toolkits. If you plan to customize or add sequences, modify the GUI, or develop new features, proceed to the next section.

  1. Go to your project folder and create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate
  2. Install marge-mri

    pip install marge-mri==1.0.0b2
  3. Launch the GUI from terminal:

    marge-mri
  4. Configure your MaRGE session and hardware by following this Hardware Configuration Guide.

ii. Install MaRGE from Source

Installing MaRGE from source is recommended for users who want full control over the codebase.
This option allows you to modify existing sequences, extend the GUI, contribute new features, or adapt MaRGE to your specific workflows. Note that the commands indicated here for Windows run on GitBash, not in PowerShell.

  1. Go to the folder where you want to create the project and clone the repo

    git clone https://github.com/josalggui/MaRGE.git
  2. Go into the created MaRGE folder. Create and activate a virtual environment. Then, add the current folder (MaRGE) to Python's module search path:

    cd MaRGE
    python -m venv venv
    source venv/bin/activate
    export PYTHONPATH=$(pwd)
  3. Install requirements

    pip install -r requirements.txt
  4. Go into MaRGE/marge folder and run the main.py.

    cd marge
    python main.py
  5. Configure your MaRGE session and hardware by following this Hardware Configuration Guide.

iii. Minimal Hardware Configuration

After running MaRGe by the first time, you have to do a minimal configuration of the session and hardware to access the main window. This implies:

  1. Go to Session tab and create a Project and a Study.
  2. Go to Console tab and add the IP address in the available text box for the Red Pitaya, then click Save.
  3. Go to Gradients tab and click Save.
  4. Go to RF tab and add a new RF coil using the text boxes available, then click Save.
  5. Go to Others tab and write the name of your terminal on the Bash path. You can also configure your Tyger credentials if you want.

3. Guided set up of MaRCoS Server, MaRCoS Client, and Tyger (Only for Ubuntu)

There is no guided installer for windows...

4. Set up MaRCoS Server

It is much better to do this in Ubuntu...

5. Set Up the Client Computer

The client computer must be configured with a static IP address on the Ethernet interface connected to the Red Pitaya.

  1. Open Network Connections:
    • Press Windows + R to open the Run dialog box.
    • Type ncpa.cpl and press Enter to open the Network Connections window.
  2. Access Ethernet Properties:
    • Right-click on your Ethernet connection and select Properties.
  3. Select IPv4 Properties:
    • In the Ethernet Properties window, select Internet Protocol Version 4 (TCP/IPv4) and click on the Properties button.
  4. Configure Static IP:
    • In the Internet Protocol Version 4 (TCP/IPv4) Properties window, select Use the following IP address.
    • Enter the following details:
      • IP address: 192.168.1.100
      • Subnet mask: 255.255.255.0
    • Select Use the following DNS server addresses and leave them blank.
  5. Save and Exit:
    • Click OK to save the changes and close the properties window.
    • Click Close to close the Ethernet Properties window.

image

ii. Install Tyger

This section describes the manual setup of Tyger on Windows. The procedure includes installing the Tyger CLI, configuring the executable path, installing Azure CLI, logging in to Azure, and checking the Tyger connection from Git Bash and MaRGE. This procedure has been tested on Windows using Git Bash.

i. Install Tyger CLI

  1. Download the latest Windows .zip file from the official Tyger releases page:

    https://github.com/microsoft/tyger/releases

  2. Create a folder for command-line executables. For example:

    C:\Users\<user>\bin
    
  3. Extract the Tyger .zip file into that folder.

  4. Add the folder to the Windows PATH environment variable:

    1. Open the Windows configuration.

    2. Search for Edit the system environment variables.

    3. Click Environment Variables....

    4. In User variables select New.

    5. Add the Tyger executable folder, for example:

      C:\Users\<user>\bin
      
    6. Save the changes.

  5. Open Git Bash and check that Tyger is available:

    tyger --version

ii. Install Azure CLI

Azure CLI is required to authenticate the Tyger client.

  1. Download the Azure CLI .zip installer for Windows from the official Microsoft documentation:

    https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&pivots=zip

  2. Extract the Azure CLI package into a local folder. For example:

    C:\Users\<user>\azure-cli
    

    In Git Bash, this folder is accessed as:

    /c/Users/<user>/azure-cli
  3. Open Git Bash and go to the Azure CLI bin folder:

    cd /c/Users/<user>/azure-cli/bin
  4. Check that Azure CLI can be executed:

    ./az.cmd --version
  5. Log in to Azure:

    ./az.cmd login --allow-no-subscriptions

    A browser window will open to complete the login process.

iii. Log in to Tyger

After completing the Azure login, Tyger can be connected to the Tyger server.

Run the following command from Git Bash:

tyger login https://i3m.tyger.cloud

Then check that Tyger can list the available runs:

tyger run list

At the end of this section, the Windows computer should be able to authenticate with Azure and communicate with the Tyger server.

After this configuration, Tyger processes should be executable from MaRGE on Windows.

v. Notes

  1. Git Bash is recommended for this workflow.

  2. After modifying the Windows PATH, all open terminals must be closed and reopened.

  3. If the az command is not recognized globally, Azure CLI can still be executed manually from its bin folder using:

    ./az.cmd
⚠️ **GitHub.com Fallback** ⚠️