Skip to content

Commit c8f56f1

Browse files
committed
Update docker-image.yml
1 parent 45368fd commit c8f56f1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,30 @@ jobs:
1212
- name: Checkout repository
1313
uses: actions/checkout@v4
1414

15+
# Set up Python (no need for full Anaconda in CI)
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
21+
# Install huggingface_hub CLI
22+
- name: Install huggingface_hub CLI
23+
run: pip install -U "huggingface_hub[cli]"
24+
25+
# Cache the downloaded model directory
26+
- name: Cache HuggingFace model
27+
id: cache-model
28+
uses: actions/cache@v4
29+
with:
30+
path: app/models/BitNet-b1.58-2B-4T
31+
key: bitnet-model-${{ hashFiles('**/docker-image.yml') }}
32+
33+
# Download the model if not cached
34+
- name: Download BitNet model
35+
if: steps.cache-model.outputs.cache-hit != 'true'
36+
run: |
37+
huggingface-cli download microsoft/BitNet-b1.58-2B-4T-gguf --local-dir app/models/BitNet-b1.58-2B-4T
38+
1539
- name: Set up Docker Buildx
1640
uses: docker/setup-buildx-action@v3
1741

0 commit comments

Comments
 (0)