Files
concrete/builders/Dockerfile.release_tarball_linux_x86_64
2022-06-16 17:04:25 +02:00

28 lines
1.2 KiB
Docker

FROM quay.io/pypa/manylinux_2_24_x86_64
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential ninja-build
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# Setup gcc7
COPY --from=ghcr.io/zama-ai/gcc7:latest /gcc7 /gcc7
ENV PATH=/gcc7/bin:$PATH
ENV LD_LIBRARY_PATH=/gcc7/lib/:/gcc7/lib64/:$LD_LIBRARY_PATH
ENV CC=/gcc7/bin/gcc-7.5.0
ENV CXX=/gcc7/bin/g++-7.5.0
# Setup LLVM
COPY /llvm-project /llvm-project
# Setup Concrete
COPY --from=ghcr.io/zama-ai/concrete-compiler-api-env:latest /target/release /concrete/target/release
ENV CONCRETE_PROJECT=/concrete
# Setup and build compiler
COPY .github/workflows/assets/Installation.md /
COPY /compiler /compiler
WORKDIR /compiler
RUN make -e CXX_COMPILER=$CXX CC_COMPILER=$CC BINDINGS_PYTHON_ENABLED=OFF concretecompiler
# Build tarball
RUN mkdir -p /tarballs/concretecompiler/lib /tarballs/concretecompiler/bin && \
cp /compiler/build/bin/concretecompiler /tarballs/concretecompiler/bin && \
cp /compiler/build/lib/libConcretelangRuntime.so /tarballs/concretecompiler/lib && \
cp /Installation.md /tarballs/concretecompiler/
RUN cd /tarballs && tar -czvf concretecompiler.tar.gz concretecompiler