Spaces:
Running
Running
Enzo Reis de Oliveira
commited on
Commit
·
96362fc
1
Parent(s):
6f6fe4e
Adding Dockerfile
Browse files- Dockerfile +13 -0
Dockerfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9.7
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
COPY requirements.txt .
|
| 5 |
+
RUN pip install -r --no-cache-dir requirements.txt
|
| 6 |
+
# preload models
|
| 7 |
+
RUN python -c '\
|
| 8 |
+
from transformers import BartForConditionalGeneration, AutoTokenizer;\
|
| 9 |
+
AutoTokenizer.from_pretrained("ibm/materials.selfies-ted");\
|
| 10 |
+
BartForConditionalGeneration.from_pretrained("ibm/materials.selfies-ted")'
|
| 11 |
+
COPY . .
|
| 12 |
+
|
| 13 |
+
CMD ["python", "app.py"]
|