rabiyulfahim commited on
Commit
c9a578b
·
verified ·
1 Parent(s): eefcf7b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -15,16 +15,16 @@ RUN pip install --no-cache-dir -r requirements.txt
15
  COPY . .
16
 
17
  # ✅ Hugging Face cache directory (use /tmp, writable in Spaces)
18
- 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
- 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
 
 
15
  COPY . .
16
 
17
  # ✅ Hugging Face cache directory (use /tmp, writable in Spaces)
18
+ # 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
+ # 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