vishalsh13's picture
Update for folder write error
5b42a86
raw
history blame
668 Bytes
# Dockerfile
FROM python:3.9-slim
WORKDIR /app
# Copy dependencies and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Set environment variables for writable directories
ENV HF_HOME=/tmp/.cache/huggingface
# Cache directory for Hugging Face
ENV TRANSFORMERS_CACHE=/tmp/.cache/transformers
# Legacy cache for compatibility
ENV BASE_PATH=/tmp/vector_db
# Base path for vector database and metadata
# Set environment variable for Hugging Face authentication token
# The `hkey` secret from Hugging Face Spaces will automatically populate this
ENV hkey=${hkey}
CMD ["python", "app.py"]