esp32-classifier / Dockerfile
mokarnoub's picture
Upload 5 files
b4df929 verified
FROM python:3.9-slim-buster
ENV PYTHONUNBUFFERED=1 \
HF_HOME=/app/.cache \
TORCH_HOME=/app/cache \
USE_CUDA=false
RUN apt-get update && apt-get install -y --no-install-recommends gcc python3-dev
WORKDIR /app
COPY . .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
python -c "from transformers import pipeline; pipeline('zero-shot-classification', model='joeddav/xlm-roberta-large-xnli')"
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "app:app"]