|
| 1 | +# ================================================ |
| 2 | +# PolyLingua Environment Configuration |
| 3 | +# ================================================ |
| 4 | +# Copy this file to .env and update with your values |
| 5 | +# Run: cp .env.example .env |
| 6 | +# Then edit .env with your actual configuration |
| 7 | + |
| 8 | +# ================================================ |
| 9 | +# HuggingFace Configuration |
| 10 | +# ================================================ |
| 11 | +# Required: Get your token from https://huggingface.co/settings/tokens |
| 12 | +# This is needed to download models from HuggingFace Hub |
| 13 | +HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 14 | + |
| 15 | +# ================================================ |
| 16 | +# Model Configuration |
| 17 | +# ================================================ |
| 18 | +# LLM model ID from HuggingFace |
| 19 | +# Default model supports multilingual translation |
| 20 | +LLM_MODEL_ID=swiss-ai/Apertus-8B-Instruct-2509 |
| 21 | + |
| 22 | +# Directory to cache downloaded models |
| 23 | +# Models can be large (several GB), ensure sufficient disk space |
| 24 | +MODEL_CACHE=./data |
| 25 | + |
| 26 | +# ================================================ |
| 27 | +# Host Configuration |
| 28 | +# ================================================ |
| 29 | +# Your server/machine IP address |
| 30 | +# Use 'localhost' for local development |
| 31 | +# Use actual IP (e.g., 192.168.1.100) for network access |
| 32 | +host_ip=localhost |
| 33 | + |
| 34 | +# ================================================ |
| 35 | +# Backend Service Configuration |
| 36 | +# ================================================ |
| 37 | +# vLLM (vLLM Inference) endpoint |
| 38 | +# This is the LLM inference service endpoint |
| 39 | +VLLM_ENDPOINT=http://localhost:8028 |
| 40 | + |
| 41 | +# LLM microservice configuration |
| 42 | +# Host and port for the LLM microservice |
| 43 | +LLM_SERVICE_HOST_IP=localhost |
| 44 | +LLM_SERVICE_PORT=9000 |
| 45 | + |
| 46 | +# PolyLingua megaservice configuration |
| 47 | +# Main translation service host and port |
| 48 | +MEGA_SERVICE_HOST_IP=localhost |
| 49 | +MEGA_SERVICE_PORT=8888 |
| 50 | + |
| 51 | +# Backend service details |
| 52 | +BACKEND_SERVICE_NAME=polylingua |
| 53 | +BACKEND_SERVICE_IP=localhost |
| 54 | +BACKEND_SERVICE_PORT=8888 |
| 55 | + |
| 56 | +# ================================================ |
| 57 | +# Frontend Configuration |
| 58 | +# ================================================ |
| 59 | +# Backend endpoint URL for the frontend |
| 60 | +# This is what the UI uses to connect to the backend |
| 61 | +BACKEND_SERVICE_ENDPOINT=http://localhost:8888 |
| 62 | + |
| 63 | +# Frontend service configuration |
| 64 | +# Next.js development server configuration |
| 65 | +FRONTEND_SERVICE_IP=localhost |
| 66 | +FRONTEND_SERVICE_PORT=5173 |
| 67 | + |
| 68 | +# ================================================ |
| 69 | +# Docker Configuration |
| 70 | +# ================================================ |
| 71 | +# Docker registry for pulling images |
| 72 | +# Use 'opea' for official OPEA images |
| 73 | +REGISTRY=opea |
| 74 | + |
| 75 | +# Docker image tag |
| 76 | +# Use 'latest' for most recent version |
| 77 | +TAG=latest |
| 78 | + |
| 79 | +# ================================================ |
| 80 | +# Nginx Configuration |
| 81 | +# ================================================ |
| 82 | +# Nginx reverse proxy port |
| 83 | +# Default HTTP port |
| 84 | +NGINX_PORT=80 |
| 85 | + |
| 86 | +# ================================================ |
| 87 | +# Proxy Settings (Optional) |
| 88 | +# ================================================ |
| 89 | +# Configure if behind a corporate proxy |
| 90 | +# Leave empty if not using a proxy |
| 91 | + |
| 92 | +# HTTP proxy URL (e.g., http://proxy.company.com:8080) |
| 93 | +http_proxy= |
| 94 | + |
| 95 | +# HTTPS proxy URL (e.g., http://proxy.company.com:8080) |
| 96 | +https_proxy= |
| 97 | + |
| 98 | +# Comma-separated list of hosts to bypass proxy |
| 99 | +no_proxy=localhost,127.0.0.1 |
| 100 | + |
| 101 | +# ================================================ |
| 102 | +# Quick Start Guide |
| 103 | +# ================================================ |
| 104 | +# |
| 105 | +# 1. Copy this file: |
| 106 | +# cp .env.example .env |
| 107 | +# |
| 108 | +# 2. Edit .env and set your HF_TOKEN |
| 109 | +# |
| 110 | +# 3. Update host_ip if deploying to network |
| 111 | +# (use actual IP instead of localhost) |
| 112 | +# |
| 113 | +# 4. Start services: |
| 114 | +# docker compose up -d |
| 115 | +# |
| 116 | +# 5. Access UI at: |
| 117 | +# http://localhost:5173 (or http://<host_ip>:5173) |
| 118 | +# |
| 119 | +# ================================================ |
0 commit comments