sentiment-api / Dockerfile
reehandn's picture
upload
3d1fcc8 verified
Raw
History Blame Contribute Delete
384 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install CPU-only PyTorch (much smaller than full PyTorch)
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
# HF Spaces expects port 7860
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]