Chore: update environment configuration for local development; modify Dockerfile to streamline SDK installation and enhance startup script for better directory handling; add time verification script for system time synchronization

This commit is contained in:
salirezav
2025-08-08 16:18:37 -04:00
parent 20907509b1
commit 7a939920fa
7 changed files with 113 additions and 39 deletions

View File

@@ -4,6 +4,11 @@
echo "USDA Vision Camera System - Startup Script"
echo "=========================================="
# Ensure we are running from the script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "📂 Working directory: $SCRIPT_DIR"
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
@@ -14,6 +19,9 @@ fi
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source .venv/bin/activate
# Ensure project root is on PYTHONPATH for imports
export PYTHONPATH="$SCRIPT_DIR:$PYTHONPATH"
# Check if config file exists
if [ ! -f "config.json" ]; then
@@ -30,11 +38,11 @@ fi
# Check time synchronization
echo "🕐 Checking time synchronization..."
python check_time.py
python tests/core/check_time.py
echo ""
# Run system tests first
echo "🧪 Running system tests..."
python test_system.py
python tests/integration/test_system.py
if [ $? -ne 0 ]; then
echo "❌ System tests failed. Please check the configuration."