Skip to main content

Advanced Usage

This page covers advanced usage scenarios for the Artemis runner, including isolated installation and resource management.

Isolated Installation with pipx

When your project uses a different Python version than the one required by the Artemis runner (Python 3.11), you can use pipx to install the runner in an isolated environment. This prevents any conflicts between your project's Python dependencies and the runner's requirements.

Installing pipx

pipx is a tool for installing and running Python applications in isolated environments. It's available on PyPI and various package managers. For this guide, we'll use the PyPI installation method:

pip install --user pipx

Installing the Artemis Runner with pipx

  1. Download the zip file from the downloads page
  2. Extract the zip file
  3. Install the runner using pipx:
cd artemis-tools
pipx install --pip-args "--find-links $PWD/wheels" --python=3.11 artemis-runner

Running the Isolated Runner

After installation, you can start the Artemis runner from any directory without activating any virtual environment:

artemis-runner --runner-name <your runner name>
Benefits of pipx Installation
  • Isolates the runner's Python 3.11 environment from your project
  • Prevents dependency conflicts
  • Allows you to run the runner from any directory
  • Makes it easier to manage multiple Python versions on your system

Resource Management

Limiting RAM Usage

You can control the amount of RAM available to your evaluations using the ARTEMIS_RAM_LIMIT_MB environment variable. This is particularly useful when running evaluations on systems with limited resources or when you need to ensure consistent resource usage across different environments.

# Set RAM limit to 4GB (4096MB)
export ARTEMIS_RAM_LIMIT_MB=4096
artemis-runner --runner-name <your runner name>
note

The RAM limit is specified in megabytes (MB). For example:

  • 1GB = 1024MB
  • 2GB = 2048MB
  • 4GB = 4096MB
  • 8GB = 8192MB
warning

Setting the RAM limit too low may cause your evaluations to fail if they require more memory than allocated. Monitor your evaluations' memory usage to determine appropriate limits.