Skip to content

Commit a4ac086

Browse files
committed
diagnose rust install issue
1 parent 1473eb1 commit a4ac086

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
# docker build . \
2323
# --build-arg=BASE_IMAGE=quay.io/pawsey/rocm-mpich-base:rocm${ROCM_VER}-mpich3.4.3-ubuntu22 \
2424
# --build-arg=FEATURES=hip \
25-
# --build-arg=HIP_ARCH=gfx90a
25+
# --build-arg=HIP_ARCH=gfx90a \
26+
# --tag=mwatelescope/hyperdrive:rocm${ROCM_VER}-ubuntu22 --push
2627

2728
# -> dug MI50
2829
# export ROCM_VER=6.0.2
@@ -59,9 +60,18 @@ RUN apt-get update -y && \
5960

6061
# Get Rust
6162
ARG RUST_VERSION=stable
62-
RUN mkdir -pm755 /opt/rust /opt/cargo
63-
ENV RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/cargo PATH=/opt/cargo/bin:$PATH
64-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain=$RUST_VERSION
63+
ENV RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/cargo
64+
ENV PATH="${CARGO_HOME}/bin:${PATH}"
65+
# 2025-07-08: rustup is broken in gh actions ci if it's already installed
66+
RUN if [ ! -f $RUSTUP_HOME/settings.toml ]; then \
67+
mkdir -pm755 $RUSTUP_HOME $CARGO_HOME && ( \
68+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
69+
| env RUSTUP_HOME=$RUSTUP_HOME CARGO_HOME=$CARGO_HOME TMPDIR=$RUSTUP_HOME/tmp \
70+
sh -s -- -y \
71+
--profile=minimal \
72+
--default-toolchain=${RUST_VERSION} \
73+
) \
74+
fi
6575

6676
# optional, example: "70,80" for V100 and A100
6777
ARG CUDA_COMPUTE=""

0 commit comments

Comments
 (0)