rabiyulfahim commited on
Commit
d3e9582
·
verified ·
1 Parent(s): 2d193e2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -19,9 +19,13 @@ ENV HF_HOME=/tmp
19
 
20
  # Pre-download model into /tmp to avoid cold start
21
  RUN python -c "from transformers import AutoTokenizer, AutoModelForCausalLM; \
22
- model_id='rabiyulfahim/Python_coding_model'; \
23
- AutoTokenizer.from_pretrained(model_id, cache_dir='/tmp'); \
24
- AutoModelForCausalLM.from_pretrained(model_id, cache_dir='/tmp')"
 
 
 
 
25
 
26
 
27
  # Expose the correct port (Hugging Face default is 7860)
 
19
 
20
  # Pre-download model into /tmp to avoid cold start
21
  RUN python -c "from transformers import AutoTokenizer, AutoModelForCausalLM; \
22
+ from peft import PeftModel; \
23
+ base_model_id='microsoft/DialoGPT-small'; \
24
+ adapter_id='rabiyulfahim/Python_coding_model'; \
25
+ AutoTokenizer.from_pretrained(base_model_id, cache_dir='/tmp'); \
26
+ base_model = AutoModelForCausalLM.from_pretrained(base_model_id, cache_dir='/tmp'); \
27
+ PeftModel.from_pretrained(base_model, adapter_id, cache_dir='/tmp')"
28
+
29
 
30
 
31
  # Expose the correct port (Hugging Face default is 7860)