Skip to content

Commit d28f0fa

Browse files
authored
Install gh CLI before rapids-install-sccache (#335)
1 parent 2d4022b commit d28f0fa

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

ci-conda.Dockerfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ ENV PATH=/opt/conda/bin:$PATH
1414

1515
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
1616

17-
# Install latest gha-tools to miniforge for unbuntu
17+
# Install gha-tools, gh CLI, and sccache to miniforge for ubuntu
18+
# NOTE: gh CLI must be installed before rapids-install-sccache (uses `gh release download`)
1819
ARG SCCACHE_VER=notset
20+
ARG GH_CLI_VER=notset
21+
ARG CPU_ARCH=notset
1922
RUN <<EOF
2023
i=0; until apt-get update -y; do ((++i >= 5)) && break; sleep 10; done
2124
apt-get install -y --no-install-recommends wget
2225
wget -q https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin
26+
wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
27+
tar -xf gh_*.tar.gz && mv gh_*/bin/gh /usr/local/bin && rm -rf gh_*
2328
SCCACHE_VERSION="${SCCACHE_VER}" rapids-install-sccache
2429
apt-get purge -y wget && apt-get autoremove -y
2530
rm -rf /var/lib/apt/lists/*
@@ -64,21 +69,28 @@ case "${LINUX_VER}" in
6469
esac
6570
EOF
6671

67-
# Install latest gha-tools
72+
# Install gha-tools, gh CLI, and sccache
73+
# NOTE: gh CLI must be installed before rapids-install-sccache (uses `gh release download`)
6874
ARG SCCACHE_VER=notset
75+
ARG GH_CLI_VER=notset
76+
ARG CPU_ARCH=notset
6977
RUN <<EOF
7078
case "${LINUX_VER}" in
7179
"ubuntu"*)
7280
i=0; until apt-get update -y; do ((++i >= 5)) && break; sleep 10; done
7381
apt-get install -y --no-install-recommends wget
7482
wget -q https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin
83+
wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
84+
tar -xf gh_*.tar.gz && mv gh_*/bin/gh /usr/local/bin && rm -rf gh_*
7585
SCCACHE_VERSION="${SCCACHE_VER}" rapids-install-sccache
7686
apt-get purge -y wget && apt-get autoremove -y
7787
rm -rf /var/lib/apt/lists/*
7888
;;
7989
"rockylinux"*)
8090
dnf install -y wget
8191
wget -q https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin
92+
wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
93+
tar -xf gh_*.tar.gz && mv gh_*/bin/gh /usr/local/bin && rm -rf gh_*
8294
SCCACHE_VERSION="${SCCACHE_VER}" rapids-install-sccache
8395
dnf remove -y wget
8496
dnf clean all
@@ -269,19 +281,11 @@ rapids-mamba-retry install -y \
269281
conda clean -aiptfy
270282
EOF
271283

272-
# Install gh cli, yq, and awscli
284+
# Install yq and awscli
273285
ARG REAL_ARCH=notset
274-
ARG GH_CLI_VER=notset
275-
ARG CPU_ARCH=notset
276286
ARG YQ_VER=notset
277287
ARG AWS_CLI_VER=notset
278288
RUN <<EOF
279-
280-
rapids-retry wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
281-
tar -xf gh_*.tar.gz
282-
mv gh_*/bin/gh /usr/local/bin
283-
rm -rf gh_*
284-
285289
rapids-retry wget -q https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_${CPU_ARCH} -O /tmp/yq
286290
mv /tmp/yq /usr/bin/yq
287291
chmod +x /usr/bin/yq

ci-wheel.Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,27 @@ case "${LINUX_VER}" in
4545
esac
4646
EOF
4747

48-
# Install latest gha-tools
48+
# Install gha-tools, gh CLI, and sccache
49+
# NOTE: gh CLI must be installed before rapids-install-sccache (uses `gh release download`)
4950
ARG SCCACHE_VER=notset
51+
ARG GH_CLI_VER=notset
5052
RUN <<EOF
5153
case "${LINUX_VER}" in
5254
"ubuntu"*)
5355
i=0; until apt-get update -y; do ((++i >= 5)) && break; sleep 10; done
5456
apt-get install -y --no-install-recommends wget
5557
wget -q https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin
58+
wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
59+
tar -xf gh_*.tar.gz && mv gh_*/bin/gh /usr/local/bin && rm -rf gh_*
5660
SCCACHE_VERSION="${SCCACHE_VER}" rapids-install-sccache
5761
apt-get purge -y wget && apt-get autoremove -y
5862
rm -rf /var/lib/apt/lists/*
5963
;;
6064
"rockylinux"*)
6165
dnf install -y wget
6266
wget -q https://github.com/rapidsai/gha-tools/releases/latest/download/tools.tar.gz -O - | tar -xz -C /usr/local/bin
67+
wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
68+
tar -xf gh_*.tar.gz && mv gh_*/bin/gh /usr/local/bin && rm -rf gh_*
6369
SCCACHE_VERSION="${SCCACHE_VER}" rapids-install-sccache
6470
dnf remove -y wget
6571
dnf clean all
@@ -179,16 +185,6 @@ case "${LINUX_VER}" in
179185
esac
180186
EOF
181187

182-
# Download and install gh CLI tool
183-
ARG GH_CLI_VER=notset
184-
RUN <<EOF
185-
set -e
186-
rapids-retry wget -q https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_${CPU_ARCH}.tar.gz
187-
tar -xf gh_*.tar.gz
188-
mv gh_*/bin/gh /usr/local/bin
189-
rm -rf gh_*
190-
EOF
191-
192188
# Download and install awscli
193189
# Needed to download wheels for running tests
194190
ARG AWS_CLI_VER=notset

0 commit comments

Comments
 (0)