From fbb4c1bcfe9418ada180791992a2f26b681b06f4 Mon Sep 17 00:00:00 2001 From: kshitijrajsharma Date: Thu, 15 Feb 2024 19:13:46 +0545 Subject: [PATCH] Remove comments on dockerfile --- backend/Dockerfile | 17 +++++------------ backend/Dockerfile_CPU | 11 ++--------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 210d1127..11d652bf 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,38 +1,31 @@ -# Use a specific base image with GPU support FROM tensorflow/tensorflow:2.9.2-gpu -# Update package lists and install necessary dependencies in a single step RUN apt-get update && \ apt-get install -y python3-opencv gdal-bin libgdal-dev && \ add-apt-repository ppa:ubuntugis/ppa && \ apt-get update && \ rm -rf /var/lib/apt/lists/* -# Set environment variables for GDAL ENV CPLUS_INCLUDE_PATH=/usr/include/gdal ENV C_INCLUDE_PATH=/usr/include/gdal -# Install specific version of NumPy -RUN pip install numpy==1.23.5 -# Install GDAL with specified options +RUN pip install numpy==1.23.5 RUN pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==$(gdal-config --version) -# Copy and install Python requirements + COPY docker/ramp/docker-requirements.txt /tmp/docker-requirements.txt RUN pip install -r /tmp/docker-requirements.txt -# Upgrade setuptools -RUN pip install --upgrade setuptools +RUN pip install --upgrade setuptools COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt -# Install solaris and scikit-fmm packages + COPY docker/ramp/solaris /tmp/solaris RUN pip install /tmp/solaris --use-feature=in-tree-build && \ pip install scikit-fmm --use-feature=in-tree-build - -# Set working directory and copy the application code + WORKDIR /app COPY . /app diff --git a/backend/Dockerfile_CPU b/backend/Dockerfile_CPU index 0f80e577..159cae07 100644 --- a/backend/Dockerfile_CPU +++ b/backend/Dockerfile_CPU @@ -1,7 +1,5 @@ -# Use a specific base image with the desired TensorFlow version FROM tensorflow/tensorflow:2.9.2 -# Update package lists and install necessary dependencies in a single step RUN apt-get update && \ apt-get install -y software-properties-common python3-opencv && \ add-apt-repository ppa:ubuntugis/ppa && \ @@ -9,27 +7,22 @@ RUN apt-get update && \ apt-get install -y gdal-bin libgdal-dev && \ rm -rf /var/lib/apt/lists/* -# Set environment variables for GDAL ENV CPLUS_INCLUDE_PATH=/usr/include/gdal ENV C_INCLUDE_PATH=/usr/include/gdal -# Install specific version of NumPy RUN pip install numpy==1.23.5 - -# Install GDAL with specified options RUN pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==$(gdal-config --version) -# Copy and install Python requirements + COPY docker/ramp/docker-requirements.txt /tmp/docker-requirements.txt RUN pip install -r /tmp/docker-requirements.txt -# Upgrade setuptools + RUN pip install --upgrade setuptools COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt -# Install solaris and scikit-fmm packages COPY docker/ramp/solaris /tmp/solaris RUN pip install /tmp/solaris --use-feature=in-tree-build && \ pip install scikit-fmm --use-feature=in-tree-build