@@ -17,29 +17,42 @@ FROM ubuntu:20.04
17
17
# Set non-interactive installation to avoid user input during build
18
18
ARG DEBIAN_FRONTEND=noninteractive
19
19
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 \
22
23
software-properties-common \
23
24
build-essential \
24
25
python3 \
25
26
git \
26
27
wget \
27
28
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 && \
29
48
rm -rf /var/lib/apt/lists/*
30
49
31
- # upgrade installed components
32
- RUN apt-get upgrade && apt-get update
33
-
34
50
# Clone the Vortex repository
35
51
RUN git clone --depth=1 --recursive https://github.com/vortexgpgpu/vortex.git /vortex
36
52
37
53
# Set the initial working directory
38
54
WORKDIR /vortex
39
55
40
- # install system dependencies
41
- RUN ./ci/install_dependencies.sh
42
-
43
56
# Configure the build folder
44
57
RUN mkdir build && cd build && ../configure
45
58
@@ -50,4 +63,4 @@ RUN cd build && ./ci/toolchain_install.sh --all
50
63
RUN echo "source /vortex/build/ci/toolchain_env.sh" >> ~/.bashrc
51
64
52
65
# Set the working directory to /vortex/build
53
- WORKDIR /vortex/build
66
+ WORKDIR /vortex/build
0 commit comments