Install
This project requires Python 3.12. Please ensure that this version is installed before continuing.
Note
The application may not run correctly with earlier Python versions.
To check your current Python version, run:
or
If you do not have Python 3.12 installed, you can download it from the official website: https://www.python.org/downloads/release/python-3120/
Clone the Repository
Use Git to download the project:
Set Up the Environment
It is recommended to use a virtual environment to manage dependencies.
Create a Virtual Environment
Activate the Virtual Environment
Tip
If the environment fails to activate, ensure you have permission to execute scripts on your system.
Install Dependencies
Install the required packages using:
Warning
Ensure the virtual environment is activated before installing dependencies, or the packages may be installed globally.
GPU Support
The model is capable of running on a GPU, which can significantly speed up training and inference. To enable GPU acceleration, you need to install a CUDA-compatible version of PyTorch.
Run the following command to install PyTorch with CUDA 13.0 support:
If you are using a different CUDA version, you can find the correct installation command by visiting the official PyTorch installation guide:
PyTorch Installation Guide: https://pytorch.org/get-started/locally/
Requirements
Before installing, ensure that:
- Your system has a supported NVIDIA GPU
- The correct CUDA toolkit is installed
- Your Python environment (virtual environment recommended) is active
Using the right CUDA version ensures that PyTorch can fully utilize your GPU for faster and more efficient computation.
Prometheus and Grafana Integration
This project supports resource monitoring via Prometheus, with visualization provided by Grafana. Follow the steps below to enable this feature.
1. Prerequisite: Install Prometheus
Download the Prometheus server from the official Prometheus Downloads page.
2. Setup and Execution
Choose your operating system below to configure the environment and start the services.
1. Add Prometheus to Environment Variable Open your command line and run the following to add the Prometheus folder to your PATH. (Replace C:\Path\To\Prometheus with your actual installation folder).
Restart Required
You must close and reopen your terminal after running setx for the changes to take effect.
2. Run Prometheus Navigate to the project directory and start the Prometheus server:
1. Add Prometheus to Environment Variable You can add Prometheus to your path by editing your shell configuration (e.g., ~/.bashrc or ~/.zshrc):
2. Run Prometheus Navigate to the project directory and start the Prometheus server:
(Note: If you did not add it to your PATH, use./prometheus instead).
3. Start the API
In a separate terminal window, start your local API:
By default, the server runs athttp://127.0.0.1:8000.
4. Verification & Dashboards
Once both services are running:
-
Prometheus UI: Navigate to http://localhost:9090.
-
Raw Metrics: View raw data at http://127.0.0.1:8000/metrics.
Setup Complete
You have successfully set up the monitoring stack!
You can now view the Grafana Dashboard here: View Public Dashboard
Local Grafana Setup
If you prefer to run Grafana locally, consult the Prometheus documentation for detailed instructions.