Files
concrete/docker/Dockerfile.concretefhe-env
Arthur Meyre 1b3f9aa048 chore: use pip package for docker
- comment out package-watcher as it's not compatible with the new docker
waiting on the compiler proper release workflow to update this
- update setup_env target to be docker and bare env friendly (workaround)
- update torch_requirements.txt

refs #809
2021-11-16 10:41:53 +01:00

44 lines
1.3 KiB
Docker

FROM ubuntu:20.04
# Remove once compiler is on PyPi https://github.com/zama-ai/concretefhe-internal/issues/809
ARG WHEEL
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
apt-get install --no-install-recommends -y \
build-essential \
curl \
python3-pip \
python3.8 \
python3.8-dev \
python3.8-tk \
python3.8-venv \
python-is-python3 \
git \
graphviz* \
make \
pandoc \
shellcheck && \
rm -rf /var/lib/apt/lists/* && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir poetry
# Remove once compiler is on PyPi https://github.com/zama-ai/concretefhe-internal/issues/809
WORKDIR /pkg
COPY pkg/${WHEEL} .
ENV SRC_DIR_NAME=src
RUN echo "source /${SRC_DIR_NAME}/.docker_venv/bin/activate" >> /root/.bashrc && \
echo "if [[ \"\$?\" != \"0\" ]]; then" >> /root/.bashrc && \
echo " python3 -m venv /${SRC_DIR_NAME}/.docker_venv" >> /root/.bashrc && \
echo " source /${SRC_DIR_NAME}/.docker_venv/bin/activate" >> /root/.bashrc && \
echo " cd /${SRC_DIR_NAME}/ && make setup_env" >> /root/.bashrc && \
echo "fi" >> /root/.bashrc && \
echo "export MPLBACKEND=TkAgg" >> /root/.bashrc
WORKDIR /${SRC_DIR_NAME}
CMD ["/bin/bash"]