installation and setup - VforVitorio/F1_Strat_Manager GitHub Wiki

Installation and Setup

VforVitorio/F1_Strat_Manager

powered by

Devin

Installation and Setup

This page provides comprehensive instructions for installing the F1 Strategy Manager system, setting up the required environment, and running the application. For information about the overall system architecture, see System Architecture.

System Requirements

Before installing the F1 Strategy Manager, ensure your system meets the following requirements:

Component Requirement
Python 3.10 or higher
GPU CUDA-compatible (for local training and video inference)
Storage At least 5GB of free space for code, dependencies, and models
Memory Minimum 8GB RAM (16GB recommended)
OS Windows, Linux, or macOS

Environment Setup

The F1 Strategy Manager uses Python virtual environments to manage dependencies. The following diagram illustrates the environment setup process:

Creating a Virtual Environment

  1. Clone the repository:
  1. Create and activate a virtual environment:

Installing Dependencies

The project requires numerous Python libraries for data processing, machine learning, visualization, and the user interface. All dependencies are listed in the requirements.txt file.

Core Dependencies

To install all dependencies:

The requirements.txt file contains all necessary packages, including version specifications for compatibility.

Critical Dependencies

The following dependencies are critical for specific subsystems:

Dependency Purpose Subsystem
fastf1, openf1 Formula 1 data access Data Extraction
torch, xgboost Machine learning models Predictive Models
ultralytics YOLOv8 object detection Vision-based Gap Calculation
transformers, whisper NLP processing Radio Analysis Pipeline
streamlit Web interface User Interface
experta Rule-based expert system Strategy Engine

Running the Application

After installation, you can run the F1 Strategy Manager using Streamlit:

The application will start and open in your default web browser. If it doesn't open automatically, access it at http://localhost:8501.

Application Structure

The following diagram shows the key components of the installed system and how they interact:

Data and Model Management

The F1 Strategy Manager uses several data sources and pre-trained models. Some files are excluded from version control as specified in the gitignore file:

data/           # Raw and processed data
models/         # Trained models
outputs/        # Generated outputs
f1_cache/       # FastF1 cache
yolo-files      # YOLOv8 model files

You may need to download these files separately or generate them by running the training scripts.

Configuration (Optional)

The system doesn't require explicit configuration after installation, but you may want to customize certain aspects:

  1. FastF1 cache location: The system uses FastF1's built-in caching, which defaults to a directory in the project. You can customize this by setting the appropriate environment variables.

  2. GPU settings: If you have multiple GPUs, you might want to specify which one to use by setting the CUDA_VISIBLE_DEVICES environment variable.

Troubleshooting

Common Issues

Issue Solution
Missing dependencies Run pip install -r requirements.txt again
CUDA/GPU errors Ensure you have compatible NVIDIA drivers installed
Model file missing Download required model files or check paths
Memory errors Reduce batch sizes or use a machine with more RAM

Checking Installation

To verify that all components are correctly installed, run:

If this command executes without errors, the core dependencies are correctly installed.

On this page