Spaces:
Runtime error
Runtime error
File size: 481 Bytes
76b352a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | FROM python:3.11-slim
# HF Spaces runs containers as UID 1000
RUN useradd -m -u 1000 user
WORKDIR /app
# Install dependencies (sentence-transformers pulls torch automatically)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Set cache dir accessible to UID 1000
ENV HF_HOME=/home/user/.cache/huggingface
COPY app.py .
RUN chown -R user:user /app /home/user
USER user
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|