Solo Server is a command-line tool that simplifies the creation and management of AI model servers for various modalities such as text, images, audio, and video. It provides easy-to-use templates and an interactive setup to help you quickly start projects and deploy AI models without hassle.
- Quick Project Initialization: Start new AI server projects rapidly with built-in templates.
- Multi-Modality Support: Templates available for text (LLM), computer vision, audio processing, video processing, tabular data, and more.
- Interactive CLI: User-friendly prompts guide you through project setup.
- Optional Components: Install only the components you need using pip extras (e.g.,
[llm]
,[cv]
,[all]
). - Simple Server Management: Easily start, stop, and manage your server with straightforward commands.
- Extensible Templates: Customize existing templates or add new ones to suit your specific needs.
- Deployment Ready: Package your application into Docker containers for easy deployment.
Solo Server requires Python 3.7 or higher.
pip install solo-server
If you need support for specific AI modalities, install the corresponding extras:
-
Language Models (LLM):
pip install solo-server[llm]
-
Computer Vision (CV):
pip install solo-server[cv]
-
Audio Processing:
pip install solo-server[audio]
-
All Components:
pip install solo-server[all]
Run the init
command to start a new project. This will guide you through an interactive setup.
solo-server init
Example Interaction:
Welcome to Solo Server Project Initialization!
----------------------------------------------
Enter your project name [my_project]: my_ai_project
Choose a project template [basic]: llm
Project 'my_ai_project' initialized successfully!
cd my_ai_project
pip install -r requirements.txt
solo-server start
Your server should now be running at http://localhost:8000
.
Solo Server provides several templates to kickstart your project:
- basic: A minimal project setup.
- llm: Language models and text processing.
- cv: Computer vision projects.
- audio: Audio analysis and speech recognition.
- multimodal: Combining multiple data types (e.g., text and images).
- tabular: Data analysis on tabular datasets.
- video: Video processing and analysis.
- compound: Complex projects involving multiple AI components.
solo-server init
: Initialize a new project with an interactive setup.solo-server start
: Start the server for the current project.solo-server stop
: Stop the running server.solo-server restart
: Restart the server.solo-server status
: Check the status of the server.solo-server install
: Install project dependencies.solo-server config
: Manage project configuration.solo-server config init
: Generate a default configuration file.solo-server config show
: Display the current configuration.solo-server config set <parameter> <value>
: Set a configuration parameter.
solo-server generate
: Generate code snippets or files based on templates.solo-server generate <type> <name>
: Generate a new component (e.g.,endpoint
,model
).
solo-server help
: Display help information about commands.
-
Initialize the Project
solo-server init
Select the
llm
template. -
Install Dependencies
pip install -r requirements.txt
-
Run the Server
solo-server start
-
Test the Endpoint
Send a POST request to the server:
curl -X POST -H "Content-Type: application/json" \ -d '{"prompt": "Hello, world!"}' \ http://localhost:8000
-
Create a Dockerfile
# Dockerfile FROM python:3.9-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 8000 CMD ["solo-server", "start"]
-
Build the Docker Image
docker build -t my-ai-server .
-
Run the Docker Container
docker run -p 8000:8000 my-ai-server
Contributions are welcome! Please read the contributing guidelines before submitting a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.