Skip to content

Commit ad3b5d3

Browse files
authored
Merge pull request #239 from zenml-io/misc/add-doc-page
Add guide for adding projects to ZenML repository
2 parents 7d827b9 + 45e0c89 commit ad3b5d3

File tree

1 file changed

+224
-0
lines changed

1 file changed

+224
-0
lines changed

ADDING_PROJECTS.md

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