# CUDA torch base with Pascal (sm_61) support — cu118 wheels include sm_61,
# so the GTX 1070 works (unlike the stock TEI GPU image, which needs sm_75+).
FROM pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY server.py .

ENV HF_HOME=/root/.cache/huggingface
EXPOSE 80
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "80"]
