Skip to content

Commit

Permalink
add initial development and production dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Udit8348 committed Oct 9, 2024
1 parent 91c135a commit d3df61a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 10 deletions.
20 changes: 20 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -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
33 changes: 23 additions & 10 deletions miscs/docker/Dockerfile.ubuntu → miscs/docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
WORKDIR /vortex/build

0 comments on commit d3df61a

Please sign in to comment.