File size: 367 Bytes
92e85a3
 
 
 
 
96fd466
 
 
 
 
92e85a3
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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"]