AI-Resume-Ranker-API / Dockerfile
webcodelab's picture
Upload Dockerfile
594923c verified
Raw
History Blame Contribute Delete
590 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all files
COPY . .
# Create instance directory with proper permissions
RUN mkdir -p /app/instance && chmod 777 /app/instance
# Optional: avoid using cached Hugging Face models in root directory
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_HOME=/app/cache
# Set PYTHONPATH (useful if you're importing from app/)
ENV PYTHONPATH=/app
# HF Spaces default port is 7860
EXPOSE 7860
# Start server
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "main:app"]