From: Monosij Ghosh Date: Tue, 26 Nov 2024 09:20:39 +0000 (+0530) Subject: Kubeflow Adapter module docker file optimisation X-Git-Tag: 3.0.0~2^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=11b3c05bc9d756d498b2bcce1c31649bdc0dd2fb;p=aiml-fw%2Fathp%2Ftps%2Fkubeflow-adapter.git Kubeflow Adapter module docker file optimisation Memmory optimisation for docker image Change-Id: I33a74b159b18297c88ff3821b852009c8fc7ad1a Signed-off-by: Monosij Ghosh --- diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8839a47 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +*.log +__pycache__/ +*.pyc +*.pyo diff --git a/Dockerfile b/Dockerfile index a17ffb1..ed78ce2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,21 +19,19 @@ FROM ubuntu:22.04 # location in the container -ENV TA_DIR /home/app/ +ENV TA_DIR=/home/app/ +WORKDIR ${TA_DIR} # Install dependencies -RUN apt-get update && apt-get install -y \ - python3 && apt-get install -y \ - python3-pip -WORKDIR ${TA_DIR} +RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Copy sources into the container COPY . . #Install the pip3 requirements -RUN pip3 install . -RUN pip3 install -r requirements.txt -RUN pip3 install requests-toolbelt==0.10.1 +RUN pip3 install --no-cache-dir -r requirements.txt requests-toolbelt==0.10.1 . #Expose the ports EXPOSE 5000