Spaces:
Running
Running
File size: 7,062 Bytes
ab4e093 d2bbb3a ab4e093 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# AI Knowledge Distillation Platform - Environment Variables
# منصة تقطير المعرفة للذكاء الاصطناعي - متغيرات البيئة
# =============================================================================
# HUGGING FACE CONFIGURATION | تكوين Hugging Face
# =============================================================================
# Hugging Face Tokens (Required for different access levels)
# رموز Hugging Face (مطلوبة لمستويات وصول مختلفة)
# Get your tokens from: https://huggingface.co/settings/tokens
# Read Token - للتطوير والتعلم والوصول للنماذج العامة
HF_TOKEN_READ=your_read_token_here
# Write Token - لرفع ومشاركة النماذج مع المجتمع
HF_TOKEN_WRITE=your_write_token_here
# Fine-grained Token - للمشاريع التجارية والبيانات الطبية الحساسة
HF_TOKEN_FINE_GRAINED=your_fine_grained_token_here
# Legacy token support (use one of the above specific tokens instead)
HF_TOKEN=your_default_token_here
HUGGINGFACE_TOKEN=your_default_token_here
HUGGINGFACE_HUB_TOKEN=your_default_token_here
# Cache directories for Hugging Face
# مجلدات التخزين المؤقت لـ Hugging Face
HF_HOME=./cache/huggingface
HF_DATASETS_CACHE=./cache/datasets
TRANSFORMERS_CACHE=./cache/transformers
# =============================================================================
# CPU OPTIMIZATION | تحسين المعالج
# =============================================================================
# Number of threads for CPU operations
# عدد الخيوط لعمليات المعالج
OMP_NUM_THREADS=8
MKL_NUM_THREADS=8
NUMEXPR_NUM_THREADS=8
OPENBLAS_NUM_THREADS=8
# Disable GPU (force CPU-only training)
# تعطيل GPU (إجبار التدريب على المعالج فقط)
CUDA_VISIBLE_DEVICES=""
# PyTorch CPU optimizations
# تحسينات PyTorch للمعالج
PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:128
TOKENIZERS_PARALLELISM=false
# =============================================================================
# MEMORY MANAGEMENT | إدارة الذاكرة
# =============================================================================
# Maximum memory usage in GB (leave 2GB for system)
# الحد الأقصى لاستخدام الذاكرة بالجيجابايت (اترك 2GB للنظام)
MAX_MEMORY_GB=14.0
# Chunk size for large model loading (MB)
# حجم القطعة لتحميل النماذج الكبيرة (ميجابايت)
CHUNK_SIZE_MB=500.0
# Memory cleanup thresholds
# عتبات تنظيف الذاكرة
MEMORY_CLEANUP_THRESHOLD=0.85
MEMORY_EMERGENCY_THRESHOLD=0.95
# =============================================================================
# SERVER CONFIGURATION | تكوين الخادم
# =============================================================================
# Server host and port
# مضيف الخادم والمنفذ
HOST=0.0.0.0
PORT=8000
# Environment (development/production)
# البيئة (تطوير/إنتاج)
ENVIRONMENT=development
# Debug mode
# وضع التصحيح
DEBUG=true
# Resource Limits
# حدود الموارد
MAX_FILE_SIZE=5368709120 # 5GB (optimized for CPU-only)
MAX_MODELS=10
MAX_TRAINING_TIME=3600 # 1 hour
# =============================================================================
# DATABASE CONFIGURATION | تكوين قاعدة البيانات
# =============================================================================
# Database directory
# مجلد قاعدة البيانات
DATABASE_DIR=./database
# Database backup settings
# إعدادات النسخ الاحتياطي لقاعدة البيانات
DB_BACKUP_INTERVAL_HOURS=24
DB_CLEANUP_DAYS=30
# =============================================================================
# LOGGING CONFIGURATION | تكوين السجلات
# =============================================================================
# Log level (DEBUG, INFO, WARNING, ERROR)
# مستوى السجل
LOG_LEVEL=INFO
# Log directory
# مجلد السجلات
LOG_DIR=./logs
# Log file settings
# إعدادات ملف السجل
LOG_MAX_SIZE_MB=100
LOG_BACKUP_COUNT=5
# =============================================================================
# MEDICAL AI CONFIGURATION | تكوين الذكاء الاصطناعي الطبي
# =============================================================================
# DICOM processing settings
# إعدادات معالجة DICOM
DICOM_MEMORY_LIMIT_MB=1000.0
DICOM_DEFAULT_WINDOW_CENTER=40
DICOM_DEFAULT_WINDOW_WIDTH=400
# Medical image processing
# معالجة الصور الطبية
MEDICAL_TARGET_SIZE=512,512
MEDICAL_NORMALIZE_IMAGES=true
MEDICAL_ENHANCE_CONTRAST=true
# =============================================================================
# SECURITY CONFIGURATION | تكوين الأمان
# =============================================================================
# Token encryption settings
# إعدادات تشفير الرموز
TOKEN_ENCRYPTION_KEY_FILE=.token_key
# File upload security
# أمان رفع الملفات
MAX_UPLOAD_SIZE_MB=5000
ALLOWED_EXTENSIONS=.pt,.pth,.bin,.safetensors
# =============================================================================
# PERFORMANCE MONITORING | مراقبة الأداء
# =============================================================================
# System metrics collection
# جمع مقاييس النظام
ENABLE_SYSTEM_METRICS=true
METRICS_INTERVAL_SECONDS=30
STORE_METRICS_IN_DB=true
# Performance alerts
# تنبيهات الأداء
MEMORY_ALERT_THRESHOLD=0.85
ENABLE_PERFORMANCE_RECOMMENDATIONS=true
# =============================================================================
# FEATURE FLAGS | علامات الميزات
# =============================================================================
# Advanced features
# الميزات المتقدمة
ENABLE_MEMORY_MANAGEMENT=true
ENABLE_CHUNK_LOADING=true
ENABLE_CPU_OPTIMIZATION=true
ENABLE_MEDICAL_DATASETS=true
ENABLE_TOKEN_MANAGEMENT=true
# Experimental features
# الميزات التجريبية
ENABLE_AUTO_MODEL_OPTIMIZATION=true
ENABLE_PROGRESSIVE_LOADING=true
ENABLE_SMART_CACHING=true
# =============================================================================
# INSTRUCTIONS | التعليمات
# =============================================================================
# 1. Copy this file to .env: cp .env.example .env
# انسخ هذا الملف إلى .env
#
# 2. Replace placeholder values with your actual values
# استبدل القيم النائبة بقيمك الفعلية
#
# 3. Never commit .env file to version control
# لا تقم أبداً برفع ملف .env إلى نظام التحكم في الإصدارات
#
# 4. For production, use environment-specific values
# للإنتاج، استخدم قيماً خاصة بالبيئة
#
# 5. Restart the application after changing values
# أعد تشغيل التطبيق بعد تغيير القيم
|