Claude commited on
Add Render deployment config for online demo
Browse files- render.yaml Blueprint: auto-configures service, env vars, persistent disk
- Dockerfile: install PyTorch CPU-only to reduce image size (~800MB vs ~2.5GB)
- README: deployment instructions for Render
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
- Dockerfile +3 -0
- README.md +13 -0
- render.yaml +16 -0
Dockerfile
CHANGED
|
@@ -7,6 +7,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
COPY . .
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
COPY requirements.txt .
|
| 10 |
+
|
| 11 |
+
# Install PyTorch CPU-only first (much smaller than default CUDA build)
|
| 12 |
+
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
COPY . .
|
README.md
CHANGED
|
@@ -50,6 +50,19 @@ ollama pull mistral:instruct
|
|
| 50 |
ollama serve
|
| 51 |
```
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
## Migration vers deploiement local
|
| 54 |
|
| 55 |
L'application est concue pour rendre la migration triviale :
|
|
|
|
| 50 |
ollama serve
|
| 51 |
```
|
| 52 |
|
| 53 |
+
## Deploiement en ligne (Render)
|
| 54 |
+
|
| 55 |
+
Pour une demo accessible via URL publique :
|
| 56 |
+
|
| 57 |
+
1. Creer un compte sur [render.com](https://render.com)
|
| 58 |
+
2. **New > Blueprint** et connecter ce repo GitHub
|
| 59 |
+
3. Render detecte le `render.yaml` et configure le service automatiquement
|
| 60 |
+
4. Dans le dashboard Render, ajouter la variable d'environnement :
|
| 61 |
+
- `OPENROUTER_API_KEY` = votre cle OpenRouter
|
| 62 |
+
5. Cliquer **Deploy** — l'URL publique sera disponible en quelques minutes
|
| 63 |
+
|
| 64 |
+
Le plan **Starter** ($7/mois) est recommande (le free tier a 512 Mo de RAM, insuffisant pour sentence-transformers). Le disque persistant (1 Go) stocke les embeddings ChromaDB.
|
| 65 |
+
|
| 66 |
## Migration vers deploiement local
|
| 67 |
|
| 68 |
L'application est concue pour rendre la migration triviale :
|
render.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
- type: web
|
| 3 |
+
name: aim-companion
|
| 4 |
+
runtime: docker
|
| 5 |
+
plan: starter
|
| 6 |
+
envVars:
|
| 7 |
+
- key: OPENROUTER_API_KEY
|
| 8 |
+
sync: false
|
| 9 |
+
- key: LLM_BASE_URL
|
| 10 |
+
value: https://openrouter.ai/api/v1
|
| 11 |
+
- key: LLM_MODEL
|
| 12 |
+
value: mistralai/mistral-7b-instruct
|
| 13 |
+
disk:
|
| 14 |
+
name: chroma-data
|
| 15 |
+
mountPath: /app/chroma_data
|
| 16 |
+
sizeGB: 1
|