Skip to content

Latest commit

 

History

History
 
 

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Installation Instructions

Prerequisites

Ensure you have the following installed on your system:

  • Git (version 2.20 or higher)
  • Docker (version 20.10 or higher)
  • Docker Compose (version 1.29 or higher)
  • Poetry (for managing Python dependencies)

Clone the Repository

git clone https://github.com/yourusername/sparc-framework.git
cd sparc-framework

Set Up Environment Variables

  1. Copy the sample environment file:

    cp sample.env .env
  2. Open the .env file and set the required environment variables:

    OPENAI_API_KEY=your_openai_api_key
    AIDER_MODEL=your_model_choice
    # Add other necessary environment variables as needed

Install Dependencies

Using Docker

Build and run the containers using Docker Compose:

docker-compose up --build -d

Manual Installation

If you prefer to run the services manually without Docker:

  1. Install Python Dependencies:

    cd example/Completion/app
    poetry install
  2. Install Node.js Dependencies:

    cd ../../../
    npm install

Run the Application

Using Docker

The application should be running automatically after starting the Docker containers. To check the status:

docker-compose ps

Manual Execution

  1. Start the Python Application:

    cd example/Completion/app
    poetry run uvicorn main:app --host 0.0.0.0 --port 8000
  2. Start the Node.js Application:

    cd ../../../
    npm start

Running Tests

Ensure all dependencies are installed, then run the tests using Make:

make test

This will execute both Python and Node.js tests.

Additional Commands

Build the Docker Image

make build

Deploy the Application

make deploy

Troubleshooting

  • Docker Issues:

    Ensure Docker and Docker Compose are correctly installed and running. Check container logs if services are not starting as expected:

    docker-compose logs
  • Python Dependencies:

    If you encounter issues with Poetry, try reinstalling dependencies:

    poetry install --no-root
  • Node.js Issues:

    If npm install fails, try clearing the npm cache and reinstalling:

    npm cache clean --force
    npm install

Contributing

Please refer to the CONTRIBUTING.md file for guidelines on how to contribute to this project.

License

This project is licensed under the MIT License. See the LICENSE file for details.