Spaces:
Running
Running
File size: 410 Bytes
6ff26b5 | 1 2 3 4 5 6 7 8 9 10 | FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 HF_HOME=/tmp/hf TRANSFORMERS_VERBOSITY=error OMP_NUM_THREADS=4
WORKDIR /app
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir "transformers>=5.13,<6" fastapi "uvicorn[standard]" \
huggingface_hub numpy
COPY . /app
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|