Tutorial Guide: Forecast-As-A-Service
Introduction¶
- This tutorial walks you through how to run the Forecast‑as‑a‑Service project
using Docker Compose
- A two-container system for forecasting time series data
- Provides an interactive Dash frontend and FastAPI backend
- Supports uploading time series data and returning Prophet-based forecasts
What You’ll Build¶
- A Dockerized FastAPI backend that runs forecasting using Prophet
- A Dash frontend where users can upload CSV files
- A visualized forecast plot shown on the dashboard
Before You Begin¶
- Docker and Docker Compose installed and running
- Local clone of the
tutorial_forecast_as_servicerepo - Linux/macOS terminal
- Ensure ports
8000(API) and8050(UI) are available
Using the Script¶
Step 1: Navigate to the project directory
> cd $GIT_ROOT/tutorial_forecast_as_serviceStep 2: Set up thin environment
> ./tutorial_forecast_as_service/thin_client/setenv.shStep 3: Activate the virtual environment
> source dev_scripts_tutorial_forecast_as_service/thin_client/setenv.shStep 4: Build the Docker image
> i docker_build_local_image --version 1.0.0Step 5: Launch the forecast web service
> ./devops/docker_run/run_docker_forecast.sh 1.0.0Step 5: Open the app in your browser
- Access the forecast app UI at:
http://
localhost:8050 or http://0.0.0.0:8050
- Access the FastAPI docs at: [http://localhost:8000/docs](http://localhost:8000/docs) or [http://0.0.0.0:8000/docs](http://0.0.0.0:8000/docs)- Access the forecast app UI at:
http://
Step 6: Upload your CSV file
- Use the drag-and-drop file upload box at the top of the dashboard
- The file must contain: a
dscolumn (date), and aycolumn (value)

Step 7: Click generate forecast
- After upload, press the
Generate Forecastbutton

- After upload, press the
Step 8: View forecast results
- The app will show:
- A line chart of predicted values
- A summary of min/max/mean and time range

- The app will show:
Step 9: Stop the service
- In the same terminal, press
CTRL+Conce to stop the containers
- In the same terminal, press