saadkhi commited on
Commit
be03b42
·
verified ·
1 Parent(s): a0fbd48

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -5,6 +5,11 @@ WORKDIR /app
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
 
 
 
 
8
  COPY app.py .
9
 
10
- CMD ["python", "app.py"]
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
+ # 👇 Pre-download model
9
+ RUN python -c "from transformers import AutoTokenizer, AutoModelForCausalLM; \
10
+ AutoTokenizer.from_pretrained('TinyLlama/TinyLlama-1.1B-Chat-v1.0'); \
11
+ AutoModelForCausalLM.from_pretrained('TinyLlama/TinyLlama-1.1B-Chat-v1.0')"
12
+
13
  COPY app.py .
14
 
15
+ CMD ["python", "app.py"]