installation and setup - VforVitorio/F1_Strat_Manager GitHub Wiki
Installation and Setup
- Overview
- System Architecture
- Installation and Setup
- Streamlit Dashboard
- Strategy Recommendations View
- Gap Analysis View
- Radio Analysis View
- Time Predictions View
- Strategy Chat Interface
- Machine Learning Models
- Lap Time Prediction
- Tire Degradation Modeling
- Vision-based Gap Calculation
- NLP Pipeline
- Radio Transcription
- Sentiment and Intent Analysis
- Named Entity Recognition
- Expert System
- Degradation Rules
- Gap Analysis Rules
- Radio Message Rules
- Integrated Rule Engine
- Developer Guide
- API Reference
- Integration Guide
Installation and Setup
- .gitignore
- README.md
- requirements.txt
- scripts/app/components/__init__.py
- scripts/app/utils/__init__.py
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
- Clone the repository:
- 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:
-
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.
-
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
- Installation and Setup
- System Requirements
- Environment Setup
- Creating a Virtual Environment
- Installing Dependencies
- Core Dependencies
- Critical Dependencies
- Running the Application
- Application Structure
- Data and Model Management
- Configuration (Optional)
- Troubleshooting
- Common Issues
- Checking Installation