@@ -3,10 +3,11 @@ FROM docker.io/amd64/ubuntu:22.04 AS ld-prefix
33ENV DEBIAN_FRONTEND=noninteractive
44
55# Install amd64-specific dependencies
6- RUN apt-get update && apt-get -y install \
6+ RUN apt-get update -o Acquire::Retries=3 && apt-get install -y \
77 ca-certificates \
88 libicu70 \
9- libssl3
9+ libssl3 && \
10+ apt-get clean && rm -rf /var/lib/apt/lists/*
1011
1112# Stage 2: Main image for ppc64le Ubuntu
1213FROM ubuntu:22.04
@@ -15,12 +16,11 @@ FROM ubuntu:22.04
1516ENV DEBIAN_FRONTEND=noninteractive
1617
1718# Fix sources to point to ports.ubuntu.com for ppc64le
18- RUN sed -i 's|archive.ubuntu.com|ports.ubuntu.com|g' /etc/apt/sources.list && \
19- sed -i 's|security.ubuntu.com|ports.ubuntu.com|g' /etc/apt/sources.list
19+ RUN sed -i 's|http:// archive.ubuntu.com|http:// ports.ubuntu.com|g' /etc/apt/sources.list && \
20+ sed -i 's|http:// security.ubuntu.com|http:// ports.ubuntu.com|g' /etc/apt/sources.list
2021
2122# Update and clean apt
22- RUN apt-get update -o Acquire::Retries=3 && \
23- apt-get clean && rm -rf /var/lib/apt/lists/*
23+ RUN apt-get update -o Acquire::Retries=3 && apt-get clean && rm -rf /var/lib/apt/lists/*
2424
2525# Install dependencies for building and testing PyTorch
2626RUN apt-get update && apt-get -y install --no-install-recommends \
@@ -47,14 +47,14 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
4747 python3-scipy \
4848 virtualenv \
4949 wget \
50- ca-certificates \
51- && apt-get clean && rm -rf /var/lib/apt/lists/*
50+ ca-certificates && \
51+ apt-get clean && rm -rf /var/lib/apt/lists/*
5252
5353# Replace apt sources for ppc64el
5454RUN sed -i 's|http://archive.ubuntu.com/ubuntu|http://ports.ubuntu.com/ubuntu-ports|g' /etc/apt/sources.list && \
5555 sed -i 's|http://security.ubuntu.com/ubuntu|http://ports.ubuntu.com/ubuntu-ports|g' /etc/apt/sources.list
5656
57- # Install dependencies
57+ # Install additional dependencies
5858RUN apt-get update && apt-get install -y \
5959 apt-transport-https \
6060 ca-certificates \
@@ -69,7 +69,6 @@ RUN apt-get update && apt-get install -y \
6969 containerd.io && \
7070 apt-get clean && rm -rf /var/lib/apt/lists/*
7171
72-
7372# Copy amd64 dependencies from the ld-prefix stage
7473COPY --from=ld-prefix / /usr/x86_64-linux-gnu/
7574RUN ln -fs ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /usr/x86_64-linux-gnu/lib64/
0 commit comments