This repository tries to solve docker compose deployment problems through an AI Agent.
Install docker from here
Install docker compose from here
Which ever python installation you are running be it virtual environment or anaconda
install pip install -r requirements.txt
For generating RAG you need to clone some existing docker repositories
mkdir -p repos
cd repos
git clone https://github.com/Haxxnet/Compose-Examples.git
git clone https://github.com/docker/awesome-compose.git
git clone https://github.com/ruanbekker/awesome-docker-compose.git
chmod +x setup.sh
./setup.sh
install ollama from here
In one terminal keep running the following
ollama serve
Also download these models
ollama pull deepseek-r1:1.5b
ollama pull deepseek-r1:7b
ollama pull deepseek-r1:32b
ollama pull deepcoder:14b
ollama pull llama3.2:3b
ollama pull llama3.2:1b
ollama pull deepcoder:1.5b
ollama pull gemma3:4b
ollama pull gemma3:12b
ollama pull gemma3:4b
After downloading test the models using by first downloading curl and then use
curl http://localhost:11434/api/generate -d '{
"model": "deepseek-r1:1.5b",
"prompt": "one word about me just one word",
"stream": false
}'
Make sure it works and it keeps on running at 11434
- Go to openrouter
- Create a free key for deep seek. You need to choose option DeepSeek-R1 (free)
- Copy that key and paste in code snippet given below
- Run the following code to make sure it works.
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="<your_created_key>",
)
completion = client.chat.completions.create(
model="deepseek/deepseek-r1:free",
messages=[
{
"role": "user",
"content": "What is the meaning of life?"
}
]
)
print(completion.choices[0].message.content)
Once you make sure that works run the following in linux use
export DEEPSEEK_FREE_KEY=<your_key>
in windows use
set DEEPSEEK_FREE_KEY="<your_key>"
Use
python start.py
It will redirect you to http://localhost:8501
There are various features currently in this agent.
We can run the generated files in the chat interface itself.
We can select different models.
We can interact with AI to deploy our solutions in the chat interface itself.
As soon as the response is created all the genrated files are saved in file system in the provided
directory.
If a deployment is unsuccessful we can get feeback from the process to forward to the AI to look
at it.
If a service is running we can continously monitor it and inform the AI about any failure.
- Generating curl commands for interacting with various services.
- Getting metrics, logs from the services, resource usage and making a sense of the data fetched and also closely monitoring these services.
- Devising strategies for recovery in case of failure.
- Increase load on services for stress testing.
- Testing of backup restore of databses if databases are involved.
- ~~We are parsing the files generated by the model and saving them. The model ~~
could be made to generate the code forenvironement creation as well.Done
- ~~Saving the configurations generated in database ~~ Done
- ~~implementing RAG ~~ Done
Repeating all of this kubenetes.
The feeback information can be used to update the model parameters. But more realistc one would be first storing the monitoring information to RAG and then thinking of reinforcement learning.
~~ Done ~~
Contributions are welcome. You can reach out to me on mail (awsrohanyadav@gmail.com) or my linkedin or open an issue or pull request.
A lot of chat interface code has been borrowed from here
Thanks @krishnaik Buddy.
And @dcrey7
Thank you buddies.