From f28c8369bd3357ed332aaea15e28899102f5e6c4 Mon Sep 17 00:00:00 2001 From: Jiafu Zhang Date: Tue, 19 Dec 2023 23:36:50 +0800 Subject: [PATCH] verify Signed-off-by: Jiafu Zhang --- dev/docker/Dockerfile.bigdl-cpu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/docker/Dockerfile.bigdl-cpu b/dev/docker/Dockerfile.bigdl-cpu index a26edb283..403848876 100644 --- a/dev/docker/Dockerfile.bigdl-cpu +++ b/dev/docker/Dockerfile.bigdl-cpu @@ -1,10 +1,11 @@ +# syntax=docker/dockerfile:1 FROM ubuntu:22.04 ENV LANG C.UTF-8 WORKDIR /root/llm-on-ray -RUN apt-get update -y \ +RUN --mount=type=cache,target=/var/cache/apt apt-get update -y \ && apt-get install -y build-essential cmake wget curl git vim htop ssh net-tools \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -17,7 +18,7 @@ ENV PATH $CONDA_DIR/bin:$PATH # setup env SHELL ["/bin/bash", "--login", "-c"] -RUN conda init bash && \ +RUN --mount=type=cache,target=/opt/conda/pkgs conda init bash && \ unset -f conda && \ export PATH=$CONDA_DIR/bin/:${PATH} && \ conda config --add channels intel && \ @@ -27,7 +28,7 @@ COPY ./pyproject.toml . RUN mkdir ./finetune && mkdir ./inference -RUN pip install -e .[bigdl-cpu] -f https://developer.intel.com/ipex-whl-stable-cpu \ +RUN --mount=type=cache,target=/root/.cache/pip pip install -e .[bigdl-cpu] -f https://developer.intel.com/ipex-whl-stable-cpu \ -f https://download.pytorch.org/whl/torch_stable.html # Used to invalidate docker build cache with --build-arg CACHEBUST=$(date +%s)