zybrai-ml / Dockerfile
zybrAI's picture
Upload 4 files
064b842 verified
Raw
History Blame Contribute Delete
497 Bytes
# HF Space (Docker SDK) — runs the zybrAI ML inference service on port 7860.
FROM python:3.11-slim
WORKDIR /app
# HF cache dir must be writable inside the Space container.
ENV HF_HOME=/app/.cache/huggingface \
TRANSFORMERS_CACHE=/app/.cache/huggingface \
PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
# HF Spaces expect the app on port 7860.
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]