Installation¶
This guide will help you install and set up FIML on your local machine or server.
Prerequisites¶
Before installing FIML, ensure you have the following:
- Docker & Docker Compose (recommended for easiest setup)
- Python 3.11+ (for development setup)
- API keys for data providers (Alpha Vantage, FMP, etc.)
One-Command Installation (Recommended)¶
The quickest way to get started with FIML is using our interactive quickstart script:
This script will:
- ✅ Check prerequisites
- ✅ Setup environment variables
- ✅ Build Docker images
- ✅ Start all services
- ✅ Initialize database
- ✅ Verify health
Manual Installation¶
Step 1: Clone the Repository¶
Step 2: Configure Environment¶
Copy the example environment file and edit it with your configuration:
Edit .env with your preferred text editor and add your API keys:
# Data Provider API Keys
ALPHA_VANTAGE_API_KEY=your_key_here
FMP_API_KEY=your_key_here
CCXT_API_KEY=your_key_here
# Database Configuration
POSTGRES_USER=fiml
POSTGRES_PASSWORD=fiml_password
POSTGRES_DB=fiml
# Redis Configuration
REDIS_HOST=redis
REDIS_PORT=6379
# Server Configuration
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
Step 3: Start Services with Docker Compose¶
Build and start all services:
Or using docker-compose directly:
Step 4: Verify Installation¶
Check that all services are running:
You should see a response like:
{
"status": "healthy",
"version": "0.4.1",
"services": {
"api": "running",
"redis": "connected",
"postgres": "connected"
}
}
Development Setup¶
For local development without Docker:
Create Virtual Environment¶
Install Dependencies¶
Run Tests¶
Format Code¶
Service Ports¶
Once installed, the following services will be available:
| Service | Port | URL |
|---|---|---|
| API Server | 8000 | http://localhost:8000 |
| API Docs | 8000 | http://localhost:8000/docs |
| Prometheus | 9091 | http://localhost:9091 |
| Grafana | 3000 | http://localhost:3000 |
| Ray Dashboard | 8265 | http://localhost:8265 |
Troubleshooting¶
Docker Build Fails¶
If you encounter build errors:
# Clean up old containers and images
docker-compose down -v
docker system prune -f
# Rebuild from scratch
docker-compose build --no-cache
Port Already in Use¶
If port 8000 is already in use, you can change it in .env:
API Key Issues¶
Make sure your API keys are valid and have the necessary permissions. Test them individually:
# Test Alpha Vantage
curl "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=IBM&apikey=YOUR_KEY"
Database Connection Issues¶
If you can't connect to the database:
# Check if PostgreSQL container is running
docker-compose ps
# View PostgreSQL logs
docker-compose logs postgres
Next Steps¶
- Quick Start Guide - Learn how to use FIML
- Configuration Guide - Advanced configuration options
- API Documentation - Explore the API
Getting Help¶
If you encounter issues:
- Check our GitHub Issues
- Join our Discord community
- Read the FAQ