mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
update docker for micro apptainer
This commit is contained in:
parent
e73e1c2bb3
commit
667fa1662d
3 changed files with 35 additions and 29 deletions
|
@ -31,7 +31,7 @@ check_gcc_version() {
|
|||
apt-get update -y
|
||||
|
||||
# install system dependencies
|
||||
apt-get install -y build-essential valgrind libstdc++6 binutils python3 uuid-dev ccache
|
||||
apt-get install -y build-essential valgrind libstdc++6 binutils python3 uuid-dev ccache cmake
|
||||
|
||||
# Check and install GCC 11 if necessary
|
||||
if check_gcc_version; then
|
||||
|
|
|
@ -18,41 +18,32 @@ FROM ubuntu:20.04
|
|||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install necessary dependencies and upgrade installed components
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
# Update and install necessary dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common \
|
||||
build-essential \
|
||||
python3 \
|
||||
git \
|
||||
wget \
|
||||
curl \
|
||||
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 && \
|
||||
ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# upgrade installed components
|
||||
RUN apt-get upgrade && apt-get update
|
||||
|
||||
# temporary until remote dependency script gets updated
|
||||
RUN apt-get install -y cmake
|
||||
|
||||
# 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
|
||||
|
||||
|
|
|
@ -4,17 +4,32 @@ You can install Docker desktop on MAC or PC or Ubuntu.
|
|||
- MAC: https://docs.docker.com/desktop/install/mac-install
|
||||
- Ubuntu: https://docs.docker.com/desktop/install/ubuntu
|
||||
|
||||
### 1- Create a Docker image from the Dockerfile
|
||||
$ docker build -f Dockerfile.ubuntu -t vortex
|
||||
### 1- Build a Docker Image from the Dockerfile
|
||||
$ docker build --platform=linux/amd64 -t vortex-packaged -f Dockerfile.prod .
|
||||
|
||||
### 2- Build the Docker image
|
||||
$ docker docker run -it vortex /bin/bash
|
||||
### 2- Construct and run a Container from the Docker Image
|
||||
$ docker run -it --name vortex --privileged=true --platform=linux/amd64 vortex-packaged
|
||||
|
||||
### 3- Build the project
|
||||
### 3- Build the Project
|
||||
One you login the Docker terminal, you will be in the build directory.
|
||||
|
||||
$ make -s
|
||||
|
||||
### 4- Run a simple test
|
||||
### 4- Run a Simple Test
|
||||
See `docs/` to learn more!
|
||||
|
||||
$ ./ci/blackbox.sh --cores=2 --app=vecadd
|
||||
$ ./ci/blackbox.sh --cores=2 --app=vecadd
|
||||
|
||||
### 5- Exit the Container
|
||||
|
||||
$ exit
|
||||
$ docker stop vortex
|
||||
|
||||
### 6- Restart and Re-Enter the Container
|
||||
If you ran step `2` and then step `5` then, you have to start and re-enter the container
|
||||
|
||||
$ docker start vortex
|
||||
$ docker exec -it vortex
|
||||
|
||||
---
|
||||
Note: Apple Silicon macs will run the container in emulation mode, so compiling and running will take a considerable amount of time -- but it still works!
|
Loading…
Add table
Add a link
Reference in a new issue