Files
concrete/docker/Dockerfile.release
Arthur Meyre 760a0af39b chore: add torch as a proper requirement for the package
- we forgot to do that and it seems poetry chose versions of torch for all
OSes so should be good
- removed torchvision as we apparently never really used it
- make it work on linux and macOS
2021-12-15 17:59:16 +01:00

46 lines
1.4 KiB
Docker

FROM ghcr.io/zama-ai/zamalang-compiler:a9fae4c19b96ee61c7ea0a2ce26b1cd8d049e159 as builder
RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
apt-get install --no-install-recommends -y \
python3.8 \
python-is-python3 && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools && \
python3 -m pip install --no-cache-dir poetry
WORKDIR /build
COPY concrete ./concrete
COPY pyproject.toml ./pyproject.toml
RUN poetry build --format wheel
FROM ghcr.io/zama-ai/zamalang-compiler:a9fae4c19b96ee61c7ea0a2ce26b1cd8d049e159
RUN mkdir /pkg && mkdir /app
WORKDIR /pkg
COPY --from=builder /build/dist/*.whl .
COPY docker/release_resources/release_requirements.txt .
RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
apt-get install --no-install-recommends -y \
python3.8 \
python3.8-tk \
python-is-python3 \
graphviz* && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools && \
echo "export MPLBACKEND=TkAgg" >> /root/.bashrc && \
python3 -m pip install --no-cache-dir ./*.whl && \
python3 -m pip install --no-cache-dir -r release_requirements.txt
ENV LD_PRELOAD=${RT_LIB}:${LD_PRELOAD}
WORKDIR /app
COPY docker/release_resources/entry_point.sh ./entry_point.sh
RUN mkdir /data
WORKDIR /data
VOLUME [ "/data" ]
CMD ["/bin/bash", "-i", "/app/entry_point.sh"]