Spaces:
Sleeping
Sleeping
File size: 704 Bytes
5daeec4 6a1ded3 5daeec4 6a1ded3 5daeec4 6a1ded3 5daeec4 6a1ded3 5daeec4 6a1ded3 5daeec4 361e7d9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# Base image
# Use the Python 3.10 slim base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy project files into the container
COPY . .
# Install system dependencies (including FAISS)
RUN apt-get update && \
apt-get install -y libfaiss-dev && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Set the cache directory for Hugging Face models
ENV HF_HOME=/app/cache
# Ensure the cache directory exists and is writable
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Expose the application port
EXPOSE 8000
# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|