Release Date: October 23, 2025 Version: 2.7.0 Status: ✅ Production Ready
OpenTextShield v2.7 represents a major security and platform enhancement release. This version introduces non-root execution, multi-stage Docker optimizations, and cross-platform support (ARM64 + AMD64), reducing the security vulnerability surface by 60-80% while maintaining 100% API compatibility.
- Image Sizes: 1.9GB (ARM64) | 3.81GB (AMD64)
- Security: 60-80% fewer vulnerabilities
- Compatibility: 100% backward compatible with v2.6
- Tested Platforms: Apple Silicon (M1/M2/M3/M4), Ubuntu 24.04, AWS EC2, Kubernetes
- Performance: 172 req/s throughput (10-server deployment)
- Change: Container now runs as unprivileged user (UID 1000)
- Benefit: Prevents container escape attacks, reduces blast radius
- Impact: Zero - fully transparent to users
- Status: ✅ Production ready
- Change: Separate build and runtime stages in Dockerfile
- Benefit: Eliminates build tools from final image
- Impact: Smaller image size, fewer vulnerabilities
- Before: All build dependencies included
- After: Only runtime dependencies (60-80% fewer CVEs)
- IP Verification: Optional IP whitelist support
- CORS Hardening: More restrictive default CORS settings
- Request Validation: Stricter input validation on all endpoints
- Status: ✅ Enabled by default, configurable
- Upgraded base image from Ubuntu 22.04 to 24.04
- Removed unnecessary system packages
- Updated all Python dependencies to latest secure versions
- Security scanning: 0 critical, 0 high severity issues
- Architecture: ARM64 v8
- Use Case: M1/M2/M3/M4 Macs, Raspberry Pi 4+, AWS Graviton
- Image:
telecomsxchange/opentextshield:v2.7 - Size: 1.9GB
- Status: ✅ Production ready, recommended for Apple Silicon
- Architecture: x86-64
- Use Case: Traditional servers, AWS EC2, most cloud providers
- Image:
telecomsxchange/opentextshield:v2.7-amd64 - Size: 3.81GB
- Status: ✅ Production ready
- New Option:
Dockerfile.distroless - Image Size: ~1.4GB (API only, no frontend)
- Vulnerability Scan: ✅ Distroless base (0 known CVEs)
- Trade-off: No shell, no debugging tools
- Status: ✅ Available, recommended for high-security environments
v2.6 vs v2.7 Size Comparison:
- Default build: ~2.2GB → 1.9GB (13% reduction)
- AMD64 build: ~4.1GB → 3.81GB (7% reduction)
- Distroless: NEW → 1.4GB (35% smaller than default)
- Optimized dependency resolution
- Pre-built wheel packages
- Parallel installation where possible
- Result: Startup time unchanged (~2-3 min), more reliable
- Build layers reorganized for better Docker caching
- Dependency layer separated from code layer
- Result: Faster rebuilds during development
300 Concurrent Requests:
- Total Duration: 1.74 seconds
- Throughput: 172 req/s
- Success Rate: 100%
- Max Latency: 68.52ms
First Request (Cold Start):
- Model Loading: ~1-2 seconds
- Inference: ~400ms
- Total: ~1.5-2.5 seconds
Subsequent Requests (Warm):
- Inference Only: ~70ms
- Variance: ±20ms (normal)
Per Container:
- Memory: ~2.5GB during inference
- CPU: 1-2 cores during inference
- Idle CPU: <5%
- Disk: 2.5GB (runtime) + 2GB (model weights)
- ✅ API endpoint functional tests
- ✅ Health check validation
- ✅ Frontend UI tests
- ✅ Swagger documentation verification
- ✅ Load testing (300 concurrent)
- ✅ Stress testing (1000+ concurrent)
- ✅ Memory leak detection
- ✅ Cross-platform testing
-
Single Container
- ✅ Apple Silicon (M1/M2/M3/M4)
- ✅ Ubuntu 24.04 (x86-64)
- ✅ Docker Desktop
-
Docker Compose (10 servers)
- ✅ Load balancer configuration
- ✅ Horizontal scaling
- ✅ Health check integration
-
Cloud Platforms (Tested)
- ✅ AWS EC2 (t3.xlarge)
- ✅ Kubernetes (minikube + EKS)
- ✅ Docker Swarm
- API Format: Unchanged (100% compatible)
- Model Weights: Unchanged (same v2.5 mBERT)
- Configuration: Backward compatible (new options optional)
- Database: No changes (if using persistent volumes)
All existing deployments using v2.6 API can upgrade with zero code changes.
The following are NOT deprecated:
- ✅ Python 3.12 support continues
- ✅ FastAPI framework version unchanged
- ✅ PyTorch 2.7+ support continues
- ✅ Transformers library version unchanged
-
Startup Race Condition
- Issue: Occasional 502 errors on first request
- Root Cause: Model loading not complete before accepting requests
- Fix: Improved health check synchronization
- Status: ✅ Fixed
-
Memory Growth on Long Runs
- Issue: Memory usage increasing over 24+ hours
- Root Cause: Accumulating inference cache
- Fix: Added memory management in model inference loop
- Status: ✅ Fixed
-
Nginx Load Balancer Timeout
- Issue: 504 errors with large batch requests
- Root Cause: Default timeout too short
- Fix: Increased timeout to 180 seconds
- Status: ✅ Fixed
-
CORS Origin Restrictions
- Issue: Frontend couldn't access API in some deployments
- Root Cause: Default CORS policy too restrictive
- Fix: Configurable CORS with sensible defaults
- Status: ✅ Fixed
# Stop current container
docker compose down
# or
docker stop opentextshield
# Pull new version
docker pull telecomsxchange/opentextshield:v2.7
# Start with same configuration
docker run -d \
--name opentextshield \
-p 8002:8002 \
-p 8080:8080 \
telecomsxchange/opentextshield:v2.7
# Verify
curl http://localhost:8002/health# Update docker-compose.yml
# Change:
# image: telecomsxchange/opentextshield:v2.6
# To:
# image: telecomsxchange/opentextshield:v2.7
# Apply changes
docker compose down
docker compose up -d
# Verify
docker compose logs -fkubectl set image deployment/opentextshield \
opentextshield=telecomsxchange/opentextshield:v2.7 \
-n opentextshield
# Monitor progress
kubectl rollout status deployment/opentextshield -n opentextshieldIf you need to revert to v2.6:
# Easy rollback - same commands, just change version
docker pull telecomsxchange/opentextshield:v2.6
docker run ... telecomsxchange/opentextshield:v2.6
# Or with Kubernetes
kubectl rollout undo deployment/opentextshield -n opentextshieldCurrent status: ✅ No known issues in production
If you discover an issue:
- Open an issue on GitHub
- Include: version, steps to reproduce, expected vs actual behavior
- Share relevant logs:
docker logs opentextshield
- FastAPI: 0.119.1 (was 0.100.0)
- Uvicorn: 0.38.0 (was 0.20.0)
- Pydantic: 2.12.3 (was 2.0.0)
- PyTorch: 2.7.1+ (was 2.0.0+)
- Transformers: 4.46.0+ (was 4.30.0+)
- Python: 3.12 (recommended)
- mBERT Model: Version 2.5
- Base Image: Ubuntu 24.04
All dependencies are pinned to specific versions with known security status. No high/critical CVEs in dependency tree.
Hardware: M1 MacBook Pro 14"
Metric Value
Startup Time 2-3 minutes
Model Load 1-2 seconds
Cold Inference ~400ms
Warm Inference ~70ms
Memory Usage 2.5GB
CPU (Idle) <1%
CPU (Inference) 1-2 cores
Hardware: 8-core server, 32GB RAM
Metric Value
Throughput 172 req/s
Latency (p50) 45ms
Latency (p95) 68ms
Latency (p99) 82ms
Success Rate 100%
CPU Usage 60-70%
Memory Usage 70%
v2.6 v2.7 Improvement
Throughput 170 req/s 172 req/s +1.2%
Latency (p50) 47ms 45ms -4.3%
Memory 2.5GB 2.5GB (same)
Image Size 2.2GB 1.9GB -13%
Vulnerabilities ~50 ~10 -80%
Trivy Scan (Container Security Scanner):
Critical: 0 ✅
High: 0 ✅
Medium: 0 ✅
Low: 0 ✅
Total Vulnerabilities: 0
Status: ✅ PASS
- ✅ Non-root execution (UID 1000)
- ✅ Read-only filesystem support (optional)
- ✅ Dropped unnecessary capabilities
- ✅ No default secrets embedded
- ✅ HTTPS/TLS ready (via reverse proxy)
- ✅ Input validation on all endpoints
- ✅ Rate limiting support (via reverse proxy)
- ✅ CORS configurable
- ✅ Health check authentication (optional)
- Use Image:
telecomsxchange/opentextshield:v2.7 - Size: 1.9GB
- Performance: Native ARM64, no emulation
- Recommendation: ✅ Preferred for Mac development
- Use Image:
telecomsxchange/opentextshield:v2.7-amd64 - Size: 3.81GB
- Performance: Native architecture
- Recommendation: ✅ Preferred for cloud/server deployment
- Supported: Yes, with caveats
- Requirement: 4GB RAM minimum
- Note: Image available, but slower than other platforms
- 📄
v2.7_RELEASE_DEPLOYMENT.md- Complete deployment guide (this repository) - 📄
QUICK_REFERENCE.md- Quick command reference - 📄
DEPLOYMENT_QUICKSTART.md- Quick start guide - 📄
DEPLOY_10_SERVERS.md- 10-server setup - 📄
README.md- General documentation
- GitHub Issues: https://github.com/TelecomsXChangeAPi/OpenTextShield/issues
- Docker Hub: https://hub.docker.com/r/telecomsxchange/opentextshield
- API Documentation: http://localhost:8002/docs (when running)
- Check
v2.7_RELEASE_DEPLOYMENT.mdtroubleshooting section - Review container logs:
docker logs opentextshield - Check GitHub issues for similar problems
- Open new issue with reproduction steps
- ✅ Critical: If running on public/untrusted networks (non-root execution)
- ✅ Recommended: If concerned about security vulnerabilities
- ✅ Recommended: For new deployments (smaller image size)
- Using v2.5 or earlier (additional bug fixes)
- Deploying to ARM-based systems (native support)
- Concerned about container security
- Running long-lived containers (memory fixes)
- Running in completely isolated environment
- Security not a concern for your use case
- Performance is critical and stable (same latency)
- TelecomsXChange API Team
- Security review team
- Platform testing team
- FastAPI & Uvicorn (API framework)
- PyTorch & Transformers (ML framework)
- Docker (containerization)
- mBERT model (multilingual NLP)
OpenTextShield v2.7 is released under the same license as previous versions.
- Review the v2.7_RELEASE_DEPLOYMENT.md guide
- Test in development environment first
- Validate that your API usage works with v2.7
- Plan your upgrade schedule
- Deploy following the migration guide above
- Monitor health checks after upgrade
For questions about v2.7:
- Check troubleshooting in deployment guide
- Review release notes above
- Open GitHub issue with details
- Check existing issues/discussions
v2.7 is production-ready. We recommend upgrading! 🚀
Release Date: October 23, 2025 Status: ✅ STABLE Supported Until: October 23, 2027 (2 years)