VQA_docker / Dockerfile
Vigneshsaminathan's picture
Upload 10 files
a934f86 verified
Raw
History Blame Contribute Delete
462 Bytes
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download model locally during build to avoid downtime on first request
RUN python -c "from transformers import BlipProcessor; BlipProcessor.from_pretrained('Salesforce/blip-image-captioning-base')" || true
COPY . .
# Expose port that HuggingFace Spaces/Render uses
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]