CTapi-raw / Dockerfile
Your Name
Fix: Set writable cache directory for HuggingFace downloads
a4a97b6
raw
history blame contribute delete
673 Bytes
FROM python:3.10-slim
WORKDIR /app
# Set Hugging Face cache to writable directory
ENV HF_HOME=/tmp/huggingface
ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers
ENV HF_DATASETS_CACHE=/tmp/huggingface/datasets
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py foundation_engine.py two_llm_system_FIXED.py ./
# Expose port
EXPOSE 7860
# Run FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]