- Ensure Docker is installed on your system. You can download it from Docker's official website.
If you want to run the application in a Docker container, follow the instructions below.
-
Install Docker:
- For Windows and macOS, download and run the Docker Desktop installer.
- For Linux, use the package manager to install Docker. For example, on Ubuntu:
sudo apt-get update sudo apt-get install -y docker.io
-
Verify Docker Installation:
docker --version
-
Clone the Repository:
git clone https://github.com/collab-uniba/IRC-setfit-ollama-demo.git cd IRC-setfit-ollama-demo -
Set Up Environment Variables: Before running the application, you need to create the
.envfile with the required port configurations. The easiest way to do this is using the Makefile:make setup-env
This will create a
.envfile with default values:- UI_PORT: 7860
- SETFIT_PORT: 8000
- OLLAMA_PORT: 11434
You can edit the
.envfile to customize these ports if needed. -
Build and Run Containers with Docker Compose:
Option A: Using Docker Compose directly
docker-compose up --build
Option B: Using the Makefile (recommended)
make docker-compose-up
The Makefile will automatically set up the environment if needed and start the containers in detached mode.
-
Access the Web UI: Open your web browser and navigate to http://localhost:7860 (or the port you configured in
.env).
To run the containers after the initial setup, use the following command:
docker-compose upAdd the -d flag to run the containers in detached mode:
docker-compose up -dTo stop the containers:
docker-compose downOr using the Makefile:
make docker-compose-downThe project includes a Makefile with helpful commands for managing the application. To see all available commands:
make helpSome useful commands include:
make setup-env- Create.envfile with default port configurationsmake docker-compose-up- Build and start all services with Docker Composemake docker-compose-down- Stop all running servicesmake clean- Remove all generated files and Docker resources