build error

Job failed with exit code: 1. Reason: cache miss: [10/16] WORKDIR /var/www/html cache miss: [ 4/16] RUN pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir gradio flask gunicorn cache miss: [16/16] RUN echo '<?php\nheader("Content-Type: application/json");\necho json_encode([\n "status" => "ok",\n "mode" => getenv("SDK_MODE") ?: "auto",\n "timestamp" => date("c")\n]);\n?>' > /var/www/html/health.php cache miss: [11/16] COPY . . cache miss: [ 9/16] RUN echo '<VirtualHost *:7860>\n ServerName localhost\n DocumentRoot /var/www/html\n <Directory /var/www/html>\n AllowOverride All\n Require all granted\n Options Indexes FollowSymLinks\n php_value upload_max_filesize 10M\n php_value post_max_size 10M\n php_value memory_limit 256M\n </Directory>\n ErrorLog /var/log/apache2/error.log\n CustomLog /var/log/apache2/access.log combined\n</VirtualHost>' > /etc/apache2/sites-available/000-default.conf cache miss: [15/16] RUN echo '#!/bin/bash\nset -e\n\nif [ "$SDK_MODE" = "docker" ] || [ -f "Dockerfile" ]; then\n echo "🚀 Starting in DOCKER mode (Multi-SDK)"\n \n if [ -f "app.py" ]; then\n echo "📊 Detected Python/Gradio app"\n cd /var/www/html\n python app.py\n \n elif [ -f "index.php" ]; then\n echo "🐘 Detected PHP app"\n service apache2 start\n tail -f /var/log/apache2/error.log /var/log/apache2/access.log\n \n else\n echo "❌ No app.py or index.php found"\n exit 1\n fi\n\nelif [ "$SDK_MODE" = "gradio" ] || [ ! -f "Dockerfile" ]; then\n echo "🎨 Starting in GRADIO mode"\n cd /var/www/html\n python app.py\n\nelse\n echo "🤔 Auto-detecting mode..."\n if [ -f "app.py" ] && [ -f "index.php" ]; then\n echo "🔀 Both Python and PHP detected, defaulting to Python/Gradio"\n cd /var/www/html\n python app.py\n elif [ -f "app.py" ]; then\n echo "🐍 Python app detected"\n cd /var/www/html\n python app.py\n elif [ -f "index.php" ]; then\n echo "🐘 PHP app detected"\n service apache2 start\n tail -f /var/log/apache2/error.log /var/log/apache2/access.log\n else\n echo "❌ No valid app found"\n exit 1\n fi\nfi\n' > /usr/local/bin/start-app.sh && chmod +x /usr/local/bin/start-app.sh cache miss: [14/16] RUN if [ -f package.json ]; then npm install && npm run build 2>/dev/null || echo "Build failed, continuing..."; fi cache miss: [ 6/16] RUN a2enmod rewrite headers php8.2 cache miss: [12/16] RUN mkdir -p logs storage && chown -R www-data:www-data /var/www/html && chmod -R 755 /var/www/html && chmod -R 775 logs storage cache miss: [ 8/16] RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf cache miss: [ 7/16] RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf cache miss: [13/16] RUN if [ -f composer.json ]; then composer install --no-dev --optimize-autoloader --no-interaction; fi cache miss: [ 3/16] COPY requirements.txt . cache miss: [ 2/16] RUN apt-get update && apt-get install -y --no-install-recommends php8.2 php8.2-cli php8.2-common php8.2-curl php8.2-zip php8.2-gd php8.2-mysql php8.2-xml php8.2-mbstring php8.2-sqlite3 php8.2-intl apache2 libapache2-mod-php8.2 nodejs npm curl wget git sqlite3 unzip ca-certificates build-essential && rm -rf /var/lib/apt/lists/* cache miss: [ 5/16] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer {"total":21,"completed":7,"user_total":16,"user_cached":0,"user_completed":2,"user_cacheable":15,"from":1,"miss":15,"client_duration_ms":5579}

Build logs:

Fetching error logs...