FROM python:3.9.7 WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt # preload models RUN python -c '\ from transformers import BartForConditionalGeneration, AutoTokenizer;\ AutoTokenizer.from_pretrained("ibm/materials.selfies-ted");\ BartForConditionalGeneration.from_pretrained("ibm/materials.selfies-ted")' COPY . . CMD ["python", "app.py"]