Nikpatil commited on
Commit
62d3bd5
·
verified ·
1 Parent(s): 84bebe0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ WORKDIR /app
7
+
8
+ COPY . /app
9
+
10
+ RUN apt-get update && apt-get install -y \
11
+ git \
12
+ build-essential \
13
+ curl \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ RUN pip install --upgrade pip
17
+ RUN pip install -r requirements.txt
18
+
19
+ # Pre-download model and tokenizer
20
+ RUN python -c "from transformers import DebertaV2Tokenizer, DebertaV2ForSequenceClassification; \
21
+ DebertaV2Tokenizer.from_pretrained('Nikpatil/Email_classifier'); \
22
+ DebertaV2ForSequenceClassification.from_pretrained('Nikpatil/Email_classifier')"
23
+
24
+ # (Optional) If your utils.py uses spaCy
25
+ RUN python -m spacy download en_core_web_sm
26
+
27
+ EXPOSE 7860
28
+
29
+ CMD ["python", "app.py"]