File tree Expand file tree Collapse file tree 3 files changed +6
-19
lines changed
jax-inference-offloading/dockerfile Expand file tree Collapse file tree 3 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ Usage: $0 [OPTION]... GIT_URL#REF PATH
1010 -h, --help Print usage.
1111 -m, --manifest FILE The manifest yaml file to which the downloaded library is documented.
1212 Default is /opt/manifest.d/git-clone.yaml
13- --sparse-path PATH If specified, use sparse checkout to only fetch the given path.
14- PATH is relative to the repo root.
1513
1614Example:
1715 # clone JAX's main branch at /opt/jax and update manifest file at the default location
2220 exit $1
2321}
2422
25- args=$( getopt -o hm: --long help,manifest:,sparse-path: -- " $@ " )
23+ args=$( getopt -o hm: --long help,manifest: -- " $@ " )
2624if [[ $? -ne 0 ]]; then
2725 exit 1
2826fi
2927
3028# # Set default arguments
3129
3230MANIFEST=" /opt/manifest.d/git-clone.yaml"
33- SPARSE_PATH=" "
3431
3532eval set -- " $args "
3633while [ : ]; do
@@ -42,10 +39,6 @@ while [ : ]; do
4239 MANIFEST=" $2 "
4340 shift 2
4441 ;;
45- --sparse-path)
46- SPARSE_PATH=" $2 "
47- shift 2
48- ;;
4942 --)
5043 shift ;
5144 break
@@ -79,15 +72,7 @@ echo "Fetching $GIT_REPO#$GIT_REF to $DESTINATION"
7972
8073set -ex -o pipefail
8174
82- if [[ -n " ${SPARSE_PATH} " ]]; then
83- git clone --no-checkout ${GIT_REPO} ${DESTINATION}
84- pushd ${DESTINATION}
85- git sparse-checkout init --cone
86- git sparse-checkout set ${SPARSE_PATH}
87- popd
88- else
8975git clone ${GIT_REPO} ${DESTINATION}
90- fi
9176pushd ${DESTINATION}
9277if [[ -n " ${GIT_REF} " ]]; then
9378 git checkout ${GIT_REF}
Original file line number Diff line number Diff line change 8383 ssh-private-key : ${{ secrets.SSH_PRIVATE_KEY }}
8484 ssh-known-hosts : ${{ vars.SSH_KNOWN_HOSTS }}
8585 github-token : ${{ secrets.GITHUB_TOKEN }}
86- # EXTRA_BUILD_ARGS: |
87- # URLREF_TUNIX=${{ fromJson(inputs.SOURCE_URLREFS).TUNIX }}
8886
8987 outputs :
9088 DOCKER_TAG_MEALKIT : ${{ steps.build-container.outputs.DOCKER_TAG_MEALKIT }}
Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ ENV SRC_PATH_JIO=${BASE_PATH_JIO}/${SUB_PATH_JIO}
6262
6363# Check out source code
6464RUN <<"EOF" bash -ex -o pipefail
65- git clone --branch ${REF_JIO} --sparse-path ${SUB_PATH_JIO} ${URL_JIO} ${BASE_PATH_JIO}
65+ git clone --branch ${REF_JIO} --no-checkout ${URL_JIO} ${BASE_PATH_JIO}
66+ pushd ${BASE_PATH_JIO}
67+ git sparse-checkout init --cone
68+ git sparse-checkout set ${SUB_PATH_JIO}
69+ popd
6670git clone --branch ${REF_TUNIX} ${URL_TUNIX} ${SRC_PATH_TUNIX}
6771EOF
6872
You can’t perform that action at this time.
0 commit comments