Files
hash-wallet/scripts/linux/docker/Dockerfile.torch
T

27 lines
643 B
Docker

ARG BASE_IMAGE
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
COPY scripts/prepare_torch.sh /w/scripts/prepare_torch.sh
COPY scripts/linux/build_torch.sh /w/scripts/linux/build_torch.sh
ARG UID=10001
ARG GID=10001
ARG USER=builder
RUN groupadd -g "$GID" "$USER" && \
useradd -m -u "$UID" -g "$GID" -s /bin/bash "$USER"
RUN sudo chown $UID:$GID -R /w /root
USER builder
ARG TARGET
RUN if [ -n "$TARGET" ]; then \
/w/scripts/linux/build_torch.sh "$TARGET"; \
else \
/w/scripts/linux/build_torch.sh; \
fi \
&& rm -rf /w/scripts/torch_dart/simplybs
FROM --platform=linux/amd64 alpine
COPY --from=build /w /w