Skip to content

Commit 5a73de7

Browse files
authored
fix(docker): add dockerfile supporting windows (#5)
feat: add dockerfile for better windows support
2 parents b24231e + aa02e8d commit 5a73de7

File tree

2 files changed

+97
-2
lines changed

2 files changed

+97
-2
lines changed

Dockerfile.windows

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Stage 1: Build Frontend
2+
FROM mcr.microsoft.com/mirror/docker/library/node:18-alpine AS frontend-builder
3+
WORKDIR /frontend
4+
COPY chat-ui/ .
5+
RUN npm install
6+
RUN npm run build
7+
8+
# Stage 2: Build Backend
9+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS backend-builder
10+
ADD . /flare-ai-social
11+
WORKDIR /flare-ai-social
12+
RUN uv sync --frozen
13+
14+
# Stage 3: Final Image
15+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
16+
17+
# Install nginx
18+
RUN apt-get update && apt-get install -y nginx supervisor curl && \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
WORKDIR /app
22+
COPY --from=backend-builder /flare-ai-social/.venv ./.venv
23+
COPY --from=backend-builder /flare-ai-social/src ./src
24+
COPY --from=backend-builder /flare-ai-social/pyproject.toml .
25+
COPY --from=backend-builder /flare-ai-social/README.md .
26+
27+
# Copy frontend files
28+
COPY --from=frontend-builder /frontend/build /usr/share/nginx/html
29+
30+
# Copy nginx configuration
31+
COPY nginx.conf /etc/nginx/sites-enabled/default
32+
33+
# Setup supervisor configuration
34+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
35+
36+
# Allow workload operator to override environment variables
37+
LABEL "tee.launch_policy.allow_env_override"="GEMINI_API_KEY,TUNED_MODEL_NAME,SIMULATE_ATTESTATION"
38+
LABEL "tee.launch_policy.log_redirect"="always"
39+
40+
EXPOSE 80
41+
42+
# Start supervisor (which will start both nginx and the backend)
43+
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ The Docker setup mimics a TEE environment and includes an Nginx server for routi
8888
docker build -t flare-ai-social .
8989
```
9090

91-
2. **Run the Docker Container:**
91+
**NOTE:** For Windows users encountering DNS issues, you can use the alternative Windows Dockerfile:
92+
93+
```bash
94+
docker build -f Dockerfile.windows -t flare-ai-social .
95+
```
96+
97+
2. b**Run the Docker Container:**
9298

9399
```bash
94100
docker run -p 80:80 -it --env-file .env flare-ai-social
@@ -235,4 +241,50 @@ If you encounter issues, follow these steps:
235241

236242
## 💡 Next Steps
237243

238-
TODO
244+
Below are several project ideas demonstrating how the template can be used to build useful social AI agents:
245+
246+
### Dev Support on Telegram
247+
248+
- **Integrate with flare-ai-rag:**
249+
Combine the social AI agent with the [flare-ai-rag](https://github.com/flare-foundation/flare-ai-rag) model trained on the [Flare Developer Hub](https://dev.flare.network) dataset.
250+
- **Enhanced Developer Interaction:**
251+
252+
- Provide targeted support for developers exploring [FTSO](https://dev.flare.network/ftso/overview) and [FDC](https://dev.flare.network/fdc/overview).
253+
- Implement code-based interactions, including live debugging tips and code snippet sharing.
254+
255+
- **Action Steps:**
256+
- Connect the model to GitHub repositories to fetch live code examples.
257+
- Fine-tune prompt templates using technical documentation to improve precision in code-related queries.
258+
259+
### Community Support on Telegram
260+
261+
- **Simplify Technical Updates:**
262+
- Convert detailed [Flare governance proposals](https://proposals.flare.network) into concise, accessible summaries for community members.
263+
- **Real-Time Monitoring and Q&A:**
264+
265+
- Monitor channels like the [Flare Telegram](https://t.me/FlareNetwork) for live updates.
266+
- Automatically answer common community questions regarding platform changes.
267+
268+
- **Action Steps:**
269+
- Integrate modules for content summarization and sentiment analysis.
270+
- Establish a feedback loop to refine responses based on community engagement.
271+
272+
### Social Media Sentiment & Moderation Bot
273+
274+
- **Purpose:**
275+
Analyze sentiment on platforms like Twitter, Reddit, or Discord to monitor community mood, flag problematic content, and generate real-time moderation reports.
276+
277+
- **Action Steps:**
278+
- Leverage NLP libraries for sentiment analysis and content filtering.
279+
- Integrate with social media APIs to capture and process live data.
280+
- Set up dashboards to monitor trends and flagged content.
281+
282+
### Personalized Content Curation Agent
283+
284+
- **Purpose:**
285+
Curate personalized content such as news, blog posts, or tutorials tailored to user interests and engagement history.
286+
287+
- **Action Steps:**
288+
- Employ user profiling techniques to analyze preferences.
289+
- Use machine learning algorithms to recommend content based on past interactions.
290+
- Continuously refine the recommendation engine with user feedback and engagement metrics.

0 commit comments

Comments
 (0)