Spaces:
Sleeping
Sleeping
| # Use Python 3.11 slim image | |
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements first (for better caching) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p generated_test_cases | |
| RUN mkdir -p uploads | |
| RUN mkdir -p inputFiles | |
| RUN mkdir -p "Example Output Files" | |
| RUN mkdir -p "Test Case Files" | |
| # Set permissions | |
| RUN chmod -R 755 /app | |
| # Expose port | |
| EXPOSE 7860 | |
| # Hugging Face Spaces expects the app to run on port 7860 | |
| ENV PORT=7860 | |
| # Run the application | |
| CMD ["uvicorn", "apis:app", "--host", "0.0.0.0", "--port", "7860"] |