dev
torch 20 lines 520 Bytes
Raw
1 ARG BASE_IMAGE
2
3 FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
4
5 COPY scripts/prepare_torch.sh /w/scripts/prepare_torch.sh
6 COPY scripts/linux/build_torch.sh /w/scripts/linux/build_torch.sh
7
8 ARG UID=10001
9 ARG GID=10001
10 ARG USER=builder
11 RUN groupadd -g "$GID" "$USER" && \
12 useradd -m -u "$UID" -g "$GID" -s /bin/bash "$USER"
13
14 RUN sudo chown $UID:$GID -R /w /root
15 USER builder
16
17 RUN /w/scripts/linux/build_torch.sh && rm -rf /w/scripts/torch_dart/simplybs
18
19 FROM --platform=linux/amd64 alpine
20 COPY --from=build /w /w