jina-reranker / Dockerfile
Gopal2002's picture
Update Dockerfile
dd7aa57 verified
raw
history blame contribute delete
498 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Install dependencies
# Set environment variables for Hugging Face cache to a writable dir
ENV TRANSFORMERS_CACHE=/tmp/hf_cache
ENV HF_HOME=/tmp/hf_home
# Copy app files
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
# Expose the port Hugging Face expects
EXPOSE 7860
# Run the FastAPI app with Uvicorn on port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]