TuTGo commited on
Commit
c809b58
·
verified ·
1 Parent(s): f6072e2

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -0
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+ WORKDIR /code
3
+ COPY requirements.txt .
4
+ RUN pip install --no-cache-dir -r requirements.txt
5
+ COPY . .
6
+
7
+ # This line automatically downloads your massive model bypassing the 1GB limit!
8
+ RUN pip install huggingface-hub
9
+ RUN huggingface-cli download TuTGo/toxic-model toxic_xlmr.tflite --local-dir .
10
+ RUN huggingface-cli download TuTGo/toxic-model sentencepiece.bpe.model --local-dir .
11
+
12
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]