Skip to content

Commit

Permalink
Merge branch 'main' into chore/fix_broken_ccache
Browse files Browse the repository at this point in the history
  • Loading branch information
aPere3 authored Feb 21, 2025
2 parents cebdb37 + 361a0b3 commit a44e98e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
12 changes: 8 additions & 4 deletions docker/Dockerfile.concrete-compiler-env
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM quay.io/pypa/manylinux_2_28_x86_64:2024-02-08-a1b4ddc

# epel-release is for install ccache
RUN dnf clean all
RUN dnf install -y epel-release && dnf clean all
RUN dnf update -y
RUN dnf clean all && dnf install -y epel-release && dnf clean all
# hadolint ignore=DL3041
RUN dnf install -y ninja-build hwloc-devel ccache ncurses-devel openssh-clients graphviz graphviz-devel && dnf clean all
RUN dnf update -y && dnf install -y ninja-build hwloc-devel ccache ncurses-devel openssh-clients graphviz graphviz-devel && dnf clean all
RUN mkdir -p ~/.ssh/ && ssh-keyscan -t ecdsa github.com >> ~/.ssh/known_hosts
# Setup gcc-11 (required for cuda11.8)
RUN dnf install -y gcc-toolset-11 && dnf clean all
Expand All @@ -20,6 +18,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup install nightly-2024-09-30
# Add a non-root user and group
RUN groupadd -g 10001 grp02 && \
useradd -u 10000 -g grp02 usr01 && \
mkdir -p /home/usr01 && chown -R usr01:grp02 /home/usr01 /boost_1_71_0 /workdir /build
# Switch to the non-root user
USER usr01:grp02
# Install boost
ADD https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz /boost_1_71_0.tar.gz
RUN tar -xzvf /boost_1_71_0.tar.gz
Expand Down
7 changes: 6 additions & 1 deletion docker/Dockerfile.concrete-python
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ ARG version
RUN apt-get update && apt-get install --no-install-recommends -y binutils graphviz \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Add a non-root user and group
RUN groupadd -g 10001 grp02 && \
useradd -u 10000 -g grp02 usr01 && \
mkdir -p /home/usr01 && chown -R usr01:grp02 /home/usr01
# Switch to the non-root user
USER usr01:grp02
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.zama.ai/cpu/ concrete-python==${version}
6 changes: 6 additions & 0 deletions docker/Dockerfile.cuda-118-env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ RUN dnf update -y \
&& dnf -y module install nvidia-driver:latest-dkms \
&& dnf -y install cuda \
&& dnf clean all
# Add a non-root user and group
RUN groupadd -g 10001 grp02 && \
useradd -u 10000 -g grp02 usr01 && \
chown -R usr01:grp02 /usr/local/cuda-11.8
# Switch to the non-root user
USER usr01:grp02

FROM scratch
COPY --from=build /usr/local/cuda-11.8/ /usr/local/cuda-11.8/
Expand Down
6 changes: 6 additions & 0 deletions docker/Dockerfile.cuda-123-env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ RUN dnf update -y \
&& dnf -y module install nvidia-driver:latest-dkms \
&& dnf -y install cuda \
&& dnf clean all
# Add a non-root user and group
RUN groupadd -g 10001 grp02 && \
useradd -u 10000 -g grp02 usr01 && \
chown -R usr01:grp02 /usr/local/cuda-12.3
# Switch to the non-root user
USER usr01:grp02

FROM scratch
COPY --from=build /usr/local/cuda-12.3/ /usr/local/cuda-12.3/
Expand Down
9 changes: 7 additions & 2 deletions docker/Dockerfile.hpx-env
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM quay.io/pypa/manylinux_2_28_x86_64:2024-02-08-a1b4ddc as build

RUN dnf update -y
RUN dnf install -y ninja-build hwloc-devel && dnf clean all
RUN dnf update -y && dnf install -y ninja-build hwloc-devel && dnf clean all
# Setup gcc 11 (to be compatible with concrete-compiler image)
RUN dnf install -y gcc-toolset-11 && dnf clean all
ENV CC_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gcc
ENV CXX_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/c++
# Add a non-root user and group
RUN groupadd -g 10001 grp02 && \
useradd -u 10000 -g grp02 usr01 && \
chown -R usr01:grp02 /boost_1_71_0 /hpx
# Switch to the non-root user
USER usr01:grp02
# Install boost
ADD https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz /boost_1_71_0.tar.gz
RUN tar -xzvf /boost_1_71_0.tar.gz
Expand Down

0 comments on commit a44e98e

Please sign in to comment.