Spaces:
Sleeping
Sleeping
| # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
| # you will also find guides on how best to write your Dockerfile | |
| FROM python:3.9 | |
| # Create non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy all project files first (except resume files) | |
| COPY --chown=user requirements.txt main.py pdf_to_txt.py README.md Dockerfile /app/ | |
| # Install dependencies | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy resume and extra info files last to avoid overwriting | |
| COPY --chown=user resume.txt /app/resume.txt | |
| COPY --chown=user extra_info.txt /app/extra_info.txt | |
| # Expose port for Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Start FastAPI app | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |