This repository contains a collection of scripts and configurations for deploying and managing AI services, including model servers, content generation tools, and supporting infrastructure. The provided docker-compose.ai.yml file is used to orchestrate these services using Docker Compose.
The docker-compose.ai.yml file defines the following services:
-
PyTorch Model Server
- Hosts AI models for inference.
- Utilizes NVIDIA GPUs for acceleration.
- Accessible on ports
8080and8081.
-
Stable Diffusion
- A content generation tool for creating images.
- Requires NVIDIA GPUs.
-
Redis
- A caching layer for fast data access.
-
MongoDB
- A database for storing content and metadata.
-
RabbitMQ
- A message queue for asynchronous communication between services.
- Docker and Docker Compose installed on your system.
- NVIDIA drivers and
nvidia-dockerruntime for GPU-based services.
-
Clone the repository:
git clone <repository-url> cd dev-stack
-
Start the services:
docker-compose -f docker-compose.ai.yml up -d
-
Verify the services are running:
docker ps
This script automates the deployment of the stack. Run it as follows:
./deploy.shThis script helps manage GPU resources for the services. Run it as follows:
./manage-gpu.shThis script is used for managing spot instances with GPU resources. Run it as follows:
./manage-gpu-spot.sh- Update the environment variables in the
docker-compose.ai.ymlfile as needed, such asMONGO_PASSWORDandRABBITMQ_PASSWORD. - Ensure the required volumes (
model-store,sd-models, etc.) are properly set up before starting the services.
- Check the logs of a specific service:
docker logs <container-name>
- Restart a specific service:
docker-compose -f docker-compose.ai.yml restart <service-name>
This project is licensed under the MIT License.