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.

Proxy Configuration

If you're experiencing connection issues in a corporate environment with a proxy, try configuring no_proxy to allow direct connections to your Artemis deployment.

Environment Variables

  • no_proxy/NO_PROXY: Comma-separated list of hosts to bypass proxy

Troubleshooting Connection Issues

For SaaS Artemis (artemis.turintech.ai)

If you're having connection problems, try adding artemis.turintech.ai to your no_proxy:

export no_proxy=localhost,127.0.0.1,artemis.turintech.ai
artemis-runner --runner-name my-runner

Why this helps: Direct connections to Artemis can be faster and more reliable than going through corporate proxy.

For On-premise Artemis

If you're having connection problems with internal deployments, try adding your Artemis deployment to no_proxy:

# For domain-based deployment
export no_proxy=localhost,127.0.0.1,artemis.internal.company.com

# For IP-based deployment
export no_proxy=localhost,127.0.0.1,192.168.41.1

# Run with custom environment
artemis-runner --environment=custom --runner-name my-runner

Testing Connectivity

Before starting the runner, verify connectivity:

# Test direct connection (with no_proxy)
curl -v https://artemis.turintech.ai

# Test internal deployment
curl -v https://artemis.internal.company.com

Troubleshooting

If you encounter connection issues:

  1. Verify no_proxy is set correctly:

    echo $no_proxy
  2. Check if proxy is blocking Artemis:

    • SSL certificate errors may indicate proxy SSL inspection
    • Connection timeouts may indicate proxy blocking