Spaces:
Sleeping
Sleeping
Upshivam commited on
Commit Β·
d80b370
1
Parent(s): 9e109e0
update readme.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
title: DevOps Dockerfile Generator
|
| 3 |
emoji: π³
|
|
@@ -10,4 +11,162 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# π³ DevOps Dockerfile Generator
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
````markdown
|
| 2 |
---
|
| 3 |
title: DevOps Dockerfile Generator
|
| 4 |
emoji: π³
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# π³ DevOps Dockerfile Generator
|
| 14 |
+
|
| 15 |
+
Generate production-ready Dockerfiles instantly using open-source LLMs and Hugging Face inference APIs.
|
| 16 |
+
|
| 17 |
+
π Live Demo: https://huggingface.co/spaces/Upshivam786/my-devops-space
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## π Features
|
| 22 |
+
|
| 23 |
+
β
Generate Dockerfiles from simple application descriptions
|
| 24 |
+
β
Supports multiple application stacks
|
| 25 |
+
β
Production-ready Dockerfile structure
|
| 26 |
+
β
Security best practices included
|
| 27 |
+
β
AI-powered DevOps automation
|
| 28 |
+
|
| 29 |
+
Generated Dockerfiles can include:
|
| 30 |
+
|
| 31 |
+
- Multi-stage builds
|
| 32 |
+
- Non-root user setup
|
| 33 |
+
- Health checks
|
| 34 |
+
- Optimized dependency installation
|
| 35 |
+
- Clean production structure
|
| 36 |
+
- Helpful comments
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## π οΈ Tech Stack
|
| 41 |
+
|
| 42 |
+
- Python
|
| 43 |
+
- Gradio
|
| 44 |
+
- Hugging Face Spaces
|
| 45 |
+
- Hugging Face Inference API
|
| 46 |
+
- Qwen2.5-72B-Instruct
|
| 47 |
+
- Docker
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## π¦ Supported App Types
|
| 52 |
+
|
| 53 |
+
- Python / FastAPI
|
| 54 |
+
- Node.js
|
| 55 |
+
- React
|
| 56 |
+
- Go
|
| 57 |
+
- Java / Spring
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## βοΈ How It Works
|
| 62 |
+
|
| 63 |
+
1. User enters:
|
| 64 |
+
- App description
|
| 65 |
+
- Base OS
|
| 66 |
+
- Application type
|
| 67 |
+
|
| 68 |
+
2. The app sends the prompt to an LLM through Hugging Face Inference API
|
| 69 |
+
|
| 70 |
+
3. The model generates a production-ready Dockerfile
|
| 71 |
+
|
| 72 |
+
4. Output is displayed directly in the Gradio UI
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
|
| 76 |
+
## π§ What I Learned
|
| 77 |
+
|
| 78 |
+
This project helped me explore:
|
| 79 |
+
|
| 80 |
+
- AI application deployment
|
| 81 |
+
- Hugging Face Spaces
|
| 82 |
+
- LLM inference APIs
|
| 83 |
+
- API authentication & secrets management
|
| 84 |
+
- Model/provider compatibility debugging
|
| 85 |
+
- Prompt engineering for DevOps workflows
|
| 86 |
+
- Git-based deployment workflows
|
| 87 |
+
|
| 88 |
+
---
|
| 89 |
+
|
| 90 |
+
## π Project Structure
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
.
|
| 94 |
+
βββ app.py
|
| 95 |
+
βββ README.md
|
| 96 |
+
βββ requirements.txt
|
| 97 |
+
βββ .gitignore
|
| 98 |
+
````
|
| 99 |
+
|
| 100 |
+
---
|
| 101 |
+
|
| 102 |
+
## βΆοΈ Run Locally
|
| 103 |
+
|
| 104 |
+
Clone the repository:
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
git clone https://github.com/Upshivam786/llm-dockerfile-generator.git
|
| 108 |
+
cd llm-dockerfile-generator
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
Install dependencies:
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
pip install -r requirements.txt
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
Set your Hugging Face token:
|
| 118 |
+
|
| 119 |
+
```bash
|
| 120 |
+
export HF_TOKEN=your_token_here
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
Run the application:
|
| 124 |
+
|
| 125 |
+
```bash
|
| 126 |
+
python app.py
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
---
|
| 130 |
+
|
| 131 |
+
## π Environment Variables
|
| 132 |
+
|
| 133 |
+
| Variable | Description |
|
| 134 |
+
| -------- | ---------------------- |
|
| 135 |
+
| HF_TOKEN | Hugging Face API token |
|
| 136 |
+
|
| 137 |
+
---
|
| 138 |
+
|
| 139 |
+
## π Deployment
|
| 140 |
+
|
| 141 |
+
This project is deployed on Hugging Face Spaces using Gradio.
|
| 142 |
+
|
| 143 |
+
Live Space:
|
| 144 |
+
https://huggingface.co/spaces/Upshivam786/my-devops-space
|
| 145 |
+
|
| 146 |
+
---
|
| 147 |
+
|
| 148 |
+
## π Future Improvements
|
| 149 |
+
|
| 150 |
+
* Kubernetes YAML generation
|
| 151 |
+
* Docker Compose generation
|
| 152 |
+
* CI/CD pipeline generation
|
| 153 |
+
* Terraform template generation
|
| 154 |
+
* Multi-cloud deployment templates
|
| 155 |
+
* Docker security scanning suggestions
|
| 156 |
+
|
| 157 |
+
---
|
| 158 |
+
|
| 159 |
+
## π€ Contributing
|
| 160 |
+
|
| 161 |
+
Contributions, ideas, and feedback are welcome.
|
| 162 |
+
|
| 163 |
+
Feel free to fork the project and improve it.
|
| 164 |
+
|
| 165 |
+
---
|
| 166 |
+
|
| 167 |
+
## π License
|
| 168 |
+
|
| 169 |
+
MIT License
|
| 170 |
+
|
| 171 |
+
```
|
| 172 |
+
```
|