Skip to content

Commit d2a8ecf

Browse files
committed
Add guide for adding projects to ZenML repository
This commit introduces a new document, ADDING_PROJECTS.md, which outlines the requirements and steps for adding projects to the ZenML Projects repository. It includes details on necessary files, Docker configuration, backend integration, image requirements, and the deployment process, ensuring a comprehensive resource for contributors.
1 parent 7d827b9 commit d2a8ecf

File tree

1 file changed

+222
-0
lines changed

1 file changed

+222
-0
lines changed

ADDING_PROJECTS.md

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
# Adding Projects to ZenML Projects Repository
2+
3+
This guide explains how to add your ZenML project to this repository and make it available through the ZenML Projects platform.
4+
5+
## 📋 Requirements
6+
7+
Every project added to this repository must include:
8+
9+
1. **requirements.txt file** - Contains all Python dependencies
10+
2. **Dockerfile** (if special configuration is needed)
11+
3. **Backend configuration** - YAML file in the zenml-projects-backend repository
12+
13+
## 🐳 Docker Configuration
14+
15+
### When to Include a Dockerfile
16+
17+
Include a custom Dockerfile **only if** your project requires:
18+
- Special system dependencies
19+
- Custom environment variables
20+
- Additional configuration beyond Python packages
21+
- Specific build steps
22+
23+
### Dockerfile Structure
24+
25+
If your project needs a custom Dockerfile, follow this exact structure:
26+
27+
```dockerfile
28+
ARG ZENML_VERSION=latest
29+
ARG PROJECT_DIR_NAME
30+
ARG EXTENSION_VERSION=0.1.6
31+
32+
FROM zenmldocker/zenml-codespace:${ZENML_VERSION}
33+
34+
# Set build arguments again for use in subsequent commands
35+
ARG PROJECT_DIR_NAME
36+
ARG EXTENSION_VERSION
37+
38+
# Set the working directory for the project
39+
WORKDIR /home/coder/extensions/zenml-io.zenml-tutorial-${EXTENSION_VERSION}-universal/pipelines
40+
41+
# Copy the specific project's requirements file
42+
COPY ./${PROJECT_DIR_NAME}/requirements.txt /tmp/requirements.txt
43+
44+
# Install project-specific dependencies using uv for faster installation
45+
RUN uv pip install --system --no-cache -r /tmp/requirements.txt && \
46+
rm /tmp/requirements.txt
47+
48+
# Enable tutorial content for this specific project
49+
ENV ZENML_ENABLE_TUTORIAL=true
50+
51+
# Default command can be overridden in docker run or docker-compose
52+
# CMD ["python", "run.py"] # Or your project's typical entrypoint
53+
```
54+
55+
### When No Dockerfile is Needed
56+
57+
If your project only requires Python dependencies listed in `requirements.txt`, **do not include a Dockerfile**. The projects backend will automatically build your project using the generic Dockerfile available at:
58+
[https://github.com/zenml-io/zenml-projects-backend/blob/main/.docker/project.Dockerfile](https://github.com/zenml-io/zenml-projects-backend/blob/main/.docker/project.Dockerfile)
59+
60+
## 🔧 Backend Integration
61+
62+
### YAML Configuration File
63+
64+
Once your project is added to this repository, you **must** create a corresponding YAML configuration file in the `zenml-projects-backend` repository. This file should include all the following attributes:
65+
66+
```yaml
67+
project_id: your-project-id
68+
name: Your Project Name
69+
description: A comprehensive description of what your project does and its key features
70+
github: https://github.com/zenml-io/zenml-projects/tree/main/your-project-directory
71+
preview_image: https://github.com/your-org/your-project/raw/main/assets/preview.png
72+
main_image_link: https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/[PROJECT_NUMBER].jpg
73+
details: |
74+
Detailed description of your project including:
75+
76+
### What It Does
77+
78+
Explain the main functionality and purpose of your project
79+
80+
### Key Features
81+
82+
- Feature 1: Description
83+
- Feature 2: Description
84+
- Feature 3: Description
85+
86+
### How It Works
87+
88+
Step-by-step explanation of how users can use your project
89+
90+
### Architecture
91+
92+
Brief overview of the technical architecture
93+
94+
environment_variables:
95+
CUSTOM_VAR: 'value'
96+
ANOTHER_VAR: 'another_value'
97+
98+
stack:
99+
orchestrator: default
100+
artifact_store: default
101+
# Add other stack components if needed
102+
103+
tags:
104+
- Domain (e.g., LLMOps, Computer Vision, MLOps)
105+
- Technology (e.g., PyTorch, TensorFlow, Hugging Face)
106+
- Use Case (e.g., Classification, Forecasting, NLP)
107+
108+
tools_used:
109+
- zenml
110+
- pytorch
111+
- pandas
112+
- scikit-learn
113+
# Add all major tools/libraries used
114+
115+
pipelines:
116+
- name: Main Pipeline Name
117+
description: Description of what this pipeline does
118+
- name: Secondary Pipeline Name
119+
description: Description of secondary pipeline (if applicable)
120+
121+
architecture_diagram: assets/architecture-diagram.png # Optional
122+
123+
codespace:
124+
enabled: true
125+
cpu: 4
126+
memory: 8
127+
```
128+
129+
### Required YAML Attributes
130+
131+
| Attribute | Description | Required |
132+
|-----------|-------------|----------|
133+
| `project_id` | Unique identifier for your project | ✅ |
134+
| `name` | Display name of your project | ✅ |
135+
| `description` | Short description (1-2 sentences) | ✅ |
136+
| `github` | GitHub URL to your project directory | ✅ |
137+
| `preview_image` | URL to preview image | ✅ |
138+
| `main_image_link` | S3 URL to main project image | ✅ |
139+
| `details` | Detailed markdown description | ✅ |
140+
| `environment_variables` | Custom environment variables | ❌ |
141+
| `stack` | ZenML stack configuration | ✅ |
142+
| `tags` | Categorization tags | ✅ |
143+
| `tools_used` | List of technologies used | ✅ |
144+
| `pipelines` | List of pipelines in the project | ✅ |
145+
| `architecture_diagram` | Path to architecture diagram | ❌ |
146+
| `codespace` | Codespace configuration | ❌ |
147+
| `versions` | Version information | ❌ |
148+
149+
## 🖼️ Image Requirements
150+
151+
### Main Project Image
152+
153+
The `main_image_link` should point to an image stored in the S3 bucket:
154+
```
155+
https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/[PROJECT_NUMBER].jpg
156+
```
157+
158+
**Image Requirements:**
159+
- Format: JPG or PNG
160+
- Recommended size: 1200x630 pixels
161+
- High quality and representative of your project
162+
- Upload to the S3 bucket before adding to YAML
163+
164+
### Preview Image
165+
166+
The `preview_image` can be:
167+
- Stored in your project's assets directory
168+
- Hosted on GitHub (using raw.githubusercontent.com URLs)
169+
- External hosting (ensure it's reliable)
170+
171+
## 🚀 Deployment Process
172+
173+
### Step-by-Step Process
174+
175+
1. **Add Project to This Repository**
176+
- Create your project directory
177+
- Include `requirements.txt`
178+
- Add `Dockerfile` if needed
179+
- Include comprehensive README.md
180+
- Test your project locally
181+
182+
2. **Upload Main Image to S3**
183+
- Upload your main project image to the S3 bucket
184+
- Note the project number for the YAML file
185+
186+
3. **Create Backend Configuration**
187+
- Fork the `zenml-projects-backend` repository
188+
- Create the YAML configuration file
189+
- Submit a pull request
190+
191+
4. **Automatic Sync**
192+
- Once both PRs are merged to main
193+
- GitHub Actions will automatically sync the project list with Webflow
194+
- Your project will appear on the ZenML Projects website
195+
196+
### Testing Your Setup
197+
198+
Before submitting your PR, ensure:
199+
- [ ] Your project runs locally with ZenML
200+
- [ ] All dependencies are listed in `requirements.txt`
201+
- [ ] Dockerfile builds successfully (if included)
202+
- [ ] README.md is comprehensive and clear
203+
- [ ] All required YAML attributes are filled out
204+
- [ ] Images are accessible and high quality
205+
206+
## 📝 Example Projects
207+
208+
Refer to existing projects in this repository for examples:
209+
- [ZenML Support Agent](zenml-support-agent/) - LLMOps project
210+
- [Computer Vision End-to-End](end-to-end-computer-vision/) - CV project
211+
- [Credit Scorer](credit-scorer/) - Traditional ML project
212+
213+
## 🆘 Getting Help
214+
215+
If you need help adding your project:
216+
- Join our [Slack community](https://zenml.io/slack)
217+
- Open an issue in this repository
218+
- Check the [ZenML documentation](https://docs.zenml.io/)
219+
220+
## 📜 License
221+
222+
By contributing your project, you agree that it will be licensed under the Apache License Version 2.0, consistent with this repository's license.

0 commit comments

Comments
 (0)