Update Dockerfile
Browse files- 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 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|