# Use official lightweight Python image | |
FROM python:3.10-slim | |
# Set environment variables | |
ENV HF_HOME=/data | |
ENV PYTHONUNBUFFERED=1 | |
# Set working directory | |
WORKDIR /app | |
# Install dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy code | |
COPY . . | |
# Ensure run.sh is executable | |
RUN chmod +x run.sh | |
# Default command | |
CMD ["./run.sh"] | |