Spaces:
Build error
Build error
File size: 555 Bytes
76d5131 79b250b 711180d 76d5131 3f0826b 4bd23ae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
FROM python:3.10-slim
WORKDIR /app
ENV HF_HOME=/app/cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
ARG HF_TOKEN
RUN python -c "\
import os; \
os.environ['HF_TOKEN'] = '${HF_TOKEN}'; \
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM; \
AutoTokenizer.from_pretrained('NullisTerminis/oncology_t5', token=os.environ['HF_TOKEN']); \
AutoModelForSeq2SeqLM.from_pretrained('NullisTerminis/oncology_t5', token=os.environ['HF_TOKEN'])"
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |