Skip to content

Commit d3df61a

Browse files
committed
add initial development and production dockerfiles
1 parent 91c135a commit d3df61a

File tree

2 files changed

+43
-10
lines changed

2 files changed

+43
-10
lines changed

Dockerfile.dev

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:20.04
2+
3+
LABEL "Udit Subramanya"="[email protected]"
4+
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
RUN apt-get update && \
8+
apt-get install -y build-essential valgrind git wget libpng-dev libboost-all-dev uuid-dev ccache cmake
9+
10+
# Third-Party Repository to Install g++11 on Ubuntu 18.04
11+
RUN apt-get install -y manpages-dev software-properties-common
12+
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
13+
14+
RUN apt-get install -y gcc-11 g++-11
15+
16+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
17+
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
18+
19+
# create a directory for mounting the volume
20+
WORKDIR /root/vortex

miscs/docker/Dockerfile.ubuntu miscs/docker/Dockerfile.prod

+23-10
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,42 @@ FROM ubuntu:20.04
1717
# Set non-interactive installation to avoid user input during build
1818
ARG DEBIAN_FRONTEND=noninteractive
1919

20-
# Update and install necessary dependencies
21-
RUN apt-get update && apt-get install -y \
20+
# Install necessary dependencies and upgrade installed components
21+
RUN apt-get update -y && \
22+
apt-get install -y \
2223
software-properties-common \
2324
build-essential \
2425
python3 \
2526
git \
2627
wget \
2728
curl \
28-
ca-certificates && \
29+
ca-certificates \
30+
valgrind \
31+
libstdc++6 \
32+
binutils \
33+
uuid-dev \
34+
ccache \
35+
cmake && \
36+
apt-get upgrade -y && \
37+
gcc_version=$(gcc -dumpversion) && \
38+
if dpkg --compare-versions "$gcc_version" lt 11; then \
39+
echo "GCC version is less than 11. Installing GCC 11..." && \
40+
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
41+
apt-get update -y && \
42+
apt-get install -y g++-11 gcc-11 && \
43+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 && \
44+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100; \
45+
else \
46+
echo "GCC version is 11 or greater. No need to install GCC 11."; \
47+
fi && \
2948
rm -rf /var/lib/apt/lists/*
3049

31-
# upgrade installed components
32-
RUN apt-get upgrade && apt-get update
33-
3450
# Clone the Vortex repository
3551
RUN git clone --depth=1 --recursive https://github.com/vortexgpgpu/vortex.git /vortex
3652

3753
# Set the initial working directory
3854
WORKDIR /vortex
3955

40-
# install system dependencies
41-
RUN ./ci/install_dependencies.sh
42-
4356
# Configure the build folder
4457
RUN mkdir build && cd build && ../configure
4558

@@ -50,4 +63,4 @@ RUN cd build && ./ci/toolchain_install.sh --all
5063
RUN echo "source /vortex/build/ci/toolchain_env.sh" >> ~/.bashrc
5164

5265
# Set the working directory to /vortex/build
53-
WORKDIR /vortex/build
66+
WORKDIR /vortex/build

0 commit comments

Comments
 (0)