Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| # Install system dependencies, including git | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libssl-dev \ | |
| libffi-dev \ | |
| python3-dev \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Create cache and model directories with proper permissions | |
| RUN mkdir -p /app/cache/huggingface && chmod -R 777 /app/cache/huggingface | |
| RUN mkdir -p /app/gpt-oss-20b && chmod -R 777 /app/gpt-oss-20b | |
| # Set environment variables for Hugging Face cache | |
| ENV HF_HOME=/app/cache/huggingface | |
| ENV HUGGINGFACE_HUB_CACHE=/app/cache/huggingface/hub | |
| ENV HF_HUB_ENABLE_HF_TRANSFER=1 | |
| # Copy requirements file | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Expose port for the API | |
| EXPOSE 8000 | |
| # Command to run the application | |
| CMD ["python", "app.py"] |