Give complete solution for the below project stepwise in docker
Project:
AI Toolchain is a collection of tools for quickly building and deploying machine learning models for various use cases. Currently, the toolchain includes a text translation model, and more models may be added in the future. It abstracts the dirty details of how a model works similar to Huggingface and gives a clean API that you can orchestrate at aenter code here BFF level.

Features to be implemented
Abstract the layer of deployment for AI Tools. Anyone should be easily add a new model to the stack without thinking about deployments. We should be able to deploy AI Tools in such a way where each model (every model can be packaged as a container) should be independently scalable. As a user, I should be able to access APIs associated with any model.
Product Set Up
https://github.com/Samagra-Development/ai-tools#setup


GitHub (Dont use the same):
Added a centralised docker compose file
@pSN0WpSN0W committed 16 hours ago
commit 3e1f7db313c84295d41bf1f0d030abb68b408c0c
68 changes: 68 additions & 0 deletions68
docker-compose-restructure.yml
Comment on this file
@@ -11,3 +11,71 @@ services:
environment:
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
asr_google:
build:
context: src/asr/google/remote/.
dockerfile: Dockerfile
ports:
- “8002:8000”
conversation_terminator:
build:
context: src/conversation_terminator/remote/.
dockerfile: Dockerfile
ports:
- “8003:8000”
coref_spacy:
build:
context: src/coref/spacy/local/.
dockerfile: Dockerfile
ports:
- “8004:8000”
translation_bhasini:
build:
context: src/text_translation/bhashini/remote/.
dockerfile: Dockerfile
ports:
- “8005:8000”
lang_detection_bhasini:
build:
context: src/text_lang_detection/bhashini/remote/.
dockerfile: Dockerfile
ports:
- “8006:8000”
embedding_openai:
build:
context: /home/sn0w/Desktop/SamagraX/ai-tools/src/embeddings/openai/remote/.
dockerfile: Dockerfile
ports:
- “8007:8000”
environment:
- OPENAI_API_KEY=“ABC”
llm_openai_gpt3:
build:
context: src/llm/openai/chatgpt3/.
dockerfile: Dockerfile
ports:
- “8008:8000”
environment:
- OPENAI_API_KEY=“ABC”
llm_openai_gpt4:
build:
context: src/llm/openai/chatgpt4/.
dockerfile: Dockerfile
ports:
- “8009:8000”
environment:
- OPENAI_API_KEY=“ABC”
t2embedding_openai:
build:
context: src/t2embedding/openai/remote/.
dockerfile: Dockerfile
ports:
- “8010:8000”
environment:
- OPENAI_API_KEY=“ABC”
translation_google:
build:
context: src/text_translation/google/remote/.
dockerfile: Dockerfile
ports:
- “8011:8000”
2 changes: 1 addition & 1 deletion2
src/asr/google/remote/requirements.txt
Comment on this file
@@ -2,6 +2,6 @@ aiohttp==3.8.4
quart==0.18.3
async-cache==1.1.1
requests
google-cloud-speech==1.5.0
google-cloud-speech
google-auth
pydub
3 changes: 1 addition & 2 deletions3
src/embeddings/openai/remote/requirements.txt
Comment on this file
@@ -6,5 +6,4 @@ openai
numpy
pandas
tiktoken
sklearn
AST
sklearn
14 changes: 14 additions & 0 deletions14
src/llm/openai/chatgpt4/Dockerfile
Comment on this file
@@ -0,0 +1,14 @@
# Use an official Python runtime as a parent image
FROM python:3.9-slim

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

# Copy the rest of the application code to the working directory
COPY . /app/
EXPOSE 8000
# Set the entrypoint for the container
CMD [“hypercorn”, “–bind”, “0.0.0.0:8000”, “api:app”]

7 changes: 7 additions & 0 deletions7
src/llm/openai/chatgpt4/requirements.txt
Comment on this file
@@ -0,0 +1,7 @@
aiohttp==3.8.4
quart==0.18.3
async-cache==1.1.1
requests
openai
openai_async
tenacity