From 2aa6f75228a20454aadc658b17ff4d3a0b155957 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 8 Dec 2022 02:31:13 -0500 Subject: [PATCH] Cleanup apt after installing packages --- Dockerfile | 9 ++++++--- Dockerfile.gpu | 12 ++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd6e879..1edc989 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM ubuntu:18.04 AS python-ubuntu -RUN apt-get update -RUN apt-get install -y build-essential curl python3 python3-pip python3-venv +RUN apt-get update && \ + apt-get install -y build-essential curl python3 python3-pip python3-venv && \ + rm -rf /var/lib/apt/lists/* # Inorder to run pip3.6, run it the following way `python3.6 -m pip` # Update Python & Install wheel @@ -10,7 +11,9 @@ RUN python3 -m pip install wheel FROM python-ubuntu -RUN apt-get update && apt-get install liblapack-dev libpng-dev libfreetype6-dev libqhull-dev git pkg-config portaudio19-dev swig libpulse-ocaml-dev gfortran libopenblas-dev libatlas-base-dev -y +RUN apt-get update && \ + apt-get install liblapack-dev libpng-dev libfreetype6-dev libqhull-dev git pkg-config portaudio19-dev swig libpulse-ocaml-dev gfortran libopenblas-dev libatlas-base-dev -y && \ + rm -rf /var/lib/apt/lists/* RUN mkdir /training && pip3 install git+https://github.com/tystuyfzand/precise-lite.git@feature/tf24 diff --git a/Dockerfile.gpu b/Dockerfile.gpu index af7b992..26229c5 100644 --- a/Dockerfile.gpu +++ b/Dockerfile.gpu @@ -1,7 +1,8 @@ FROM nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu18.04 AS python-ubuntu -RUN apt-get update -RUN apt-get install -y build-essential curl python3 python3-pip python3-venv +RUN apt-get update && \ + apt-get install -y build-essential curl python3 python3-pip python3-venv && \ + rm -rf /var/lib/apt/lists/* # Inorder to run pip3.6, run it the following way `python3.6 -m pip` # Update Python & Install wheel @@ -9,10 +10,9 @@ RUN python3 -m pip install pip --upgrade && python3 -m pip install wheel FROM python-ubuntu -RUN apt-get update && apt-get install -y \ - liblapack-dev libpng-dev libfreetype6-dev libqhull-dev git \ - pkg-config portaudio19-dev swig libpulse-ocaml-dev gfortran \ - libopenblas-dev libatlas-base-dev +RUN apt-get update && \ + apt-get install liblapack-dev libpng-dev libfreetype6-dev libqhull-dev git pkg-config portaudio19-dev swig libpulse-ocaml-dev gfortran libopenblas-dev libatlas-base-dev -y && \ + rm -rf /var/lib/apt/lists/* RUN mkdir /training && pip3 install git+https://github.com/tystuyfzand/precise-lite.git@feature/tf24 && pip3 install tensorflow-gpu==2.4.4