KeivanR commited on
Commit
72e6d75
·
1 Parent(s): 75a89f3

dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -2
Dockerfile CHANGED
@@ -29,8 +29,15 @@ RUN pip install --no-cache-dir \
29
  # Copy entire application (including model.py)
30
  COPY . .
31
 
32
- # Special model loading step
33
- RUN python3 -c "from model import QwenClassifier; \
 
 
 
 
 
 
 
34
  QwenClassifier.from_pretrained('KeivanR/Qwen2.5-1.5B-Instruct-MLB-clf_lora-1743189446'); \
35
  print('Model loaded successfully')"
36
 
 
29
  # Copy entire application (including model.py)
30
  COPY . .
31
 
32
+ # Install your package in development mode
33
+ RUN pip install -e .
34
+
35
+ # Set up Hugging Face authentication (use a build ARG for the token)
36
+ ARG HF_TOKEN
37
+ RUN python3 -c "from huggingface_hub import login; login(token='$HF_TOKEN')"
38
+
39
+ # Test model loading (use absolute import path)
40
+ RUN python3 -c "from qwen_classifier.model import QwenClassifier; \
41
  QwenClassifier.from_pretrained('KeivanR/Qwen2.5-1.5B-Instruct-MLB-clf_lora-1743189446'); \
42
  print('Model loaded successfully')"
43