mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-10 04:35:03 -05:00
tools: create Docker release image, helper build script and requirements
- also create Documentation and issue template
This commit is contained in:
48
docker/Dockerfile.release
Normal file
48
docker/Dockerfile.release
Normal file
@@ -0,0 +1,48 @@
|
||||
FROM ghcr.io/zama-ai/zamalang-compiler 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
|
||||
|
||||
RUN mkdir /pkg && mkdir /app
|
||||
WORKDIR /pkg
|
||||
COPY --from=builder /build/dist/*.whl .
|
||||
COPY docker/datascience_requirements.txt .
|
||||
COPY torch_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 LD_PRELOAD=/compiler/build/lib/Runtime/libZamalangRuntime.so" >> /root/.bashrc && \
|
||||
echo "export MPLBACKEND=TkAgg" >> /root/.bashrc && \
|
||||
python3 -m pip install --no-cache-dir ./*.whl && \
|
||||
python3 -m pip install --no-cache-dir -r torch_requirements.txt \
|
||||
-f https://download.pytorch.org/whl/torch_stable.html && \
|
||||
python3 -m pip install --no-cache-dir -r datascience_requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
RUN printf "#!/bin/bash\npython3 -m jupyter notebook --ip=0.0.0.0 --allow-root --no-browser\n" \
|
||||
> entry_point.sh && \
|
||||
mkdir /data
|
||||
|
||||
WORKDIR /data
|
||||
VOLUME [ "/data" ]
|
||||
|
||||
CMD ["/bin/bash", "-l", "/app/entry_point.sh"]
|
||||
12
docker/Dockerfile.release.dockerignore
Normal file
12
docker/Dockerfile.release.dockerignore
Normal file
@@ -0,0 +1,12 @@
|
||||
# Ignore all
|
||||
**
|
||||
|
||||
# Not our sources
|
||||
!concrete
|
||||
!pyproject.toml
|
||||
!docker/datascience_requirements.txt
|
||||
!torch_requirements.txt
|
||||
|
||||
# But still ignore pycache
|
||||
**/__pycache__
|
||||
**/*.pyc
|
||||
5
docker/build_release_image.sh
Normal file
5
docker/build_release_image.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURR_DIR=$(dirname $0)
|
||||
DOCKER_BUILDKIT=1 docker build --pull --no-cache -f "$CURR_DIR/Dockerfile.release" \
|
||||
-t concretefhe-release "$CURR_DIR/.."
|
||||
4
docker/release_requirements.txt
Normal file
4
docker/release_requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
jupyter~=1.0.0
|
||||
opencv-python-headless~=4.5.3.56
|
||||
pandas~=1.3.2
|
||||
scikit-learn~=0.24.2
|
||||
Reference in New Issue
Block a user