diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 000000000..22cd74155 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,20 @@ +FROM ubuntu:20.04 + +LABEL "Udit Subramanya"="usubramanya3@gatech.edu" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install -y build-essential valgrind git wget libpng-dev libboost-all-dev uuid-dev ccache cmake + +# Third-Party Repository to Install g++11 on Ubuntu 18.04 +RUN apt-get install -y manpages-dev software-properties-common +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test + +RUN apt-get install -y gcc-11 g++-11 + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11 + +# create a directory for mounting the volume +WORKDIR /root/vortex \ No newline at end of file diff --git a/miscs/docker/Dockerfile.ubuntu b/miscs/docker/Dockerfile.prod similarity index 61% rename from miscs/docker/Dockerfile.ubuntu rename to miscs/docker/Dockerfile.prod index 64bb5813d..e1a8d94b5 100644 --- a/miscs/docker/Dockerfile.ubuntu +++ b/miscs/docker/Dockerfile.prod @@ -17,29 +17,42 @@ FROM ubuntu:20.04 # Set non-interactive installation to avoid user input during build ARG DEBIAN_FRONTEND=noninteractive -# Update and install necessary dependencies -RUN apt-get update && apt-get install -y \ +# Install necessary dependencies and upgrade installed components +RUN apt-get update -y && \ + apt-get install -y \ software-properties-common \ build-essential \ python3 \ git \ wget \ curl \ - ca-certificates && \ + ca-certificates \ + valgrind \ + libstdc++6 \ + binutils \ + uuid-dev \ + ccache \ + cmake && \ + apt-get upgrade -y && \ + gcc_version=$(gcc -dumpversion) && \ + if dpkg --compare-versions "$gcc_version" lt 11; then \ + echo "GCC version is less than 11. Installing GCC 11..." && \ + add-apt-repository -y ppa:ubuntu-toolchain-r/test && \ + apt-get update -y && \ + apt-get install -y g++-11 gcc-11 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100; \ + else \ + echo "GCC version is 11 or greater. No need to install GCC 11."; \ + fi && \ rm -rf /var/lib/apt/lists/* -# upgrade installed components -RUN apt-get upgrade && apt-get update - # Clone the Vortex repository RUN git clone --depth=1 --recursive https://github.com/vortexgpgpu/vortex.git /vortex # Set the initial working directory WORKDIR /vortex -# install system dependencies -RUN ./ci/install_dependencies.sh - # Configure the build folder RUN mkdir build && cd build && ../configure @@ -50,4 +63,4 @@ RUN cd build && ./ci/toolchain_install.sh --all RUN echo "source /vortex/build/ci/toolchain_env.sh" >> ~/.bashrc # Set the working directory to /vortex/build -WORKDIR /vortex/build \ No newline at end of file +WORKDIR /vortex/build