Initial version of dual gpu strest test

This commit is contained in:
Patryk Żywica 2020-12-02 11:14:30 +00:00
commit c4fba4f458
4 changed files with 70 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Installation
1. Clone git repositoty `git clone https://git.wmi.amu.edu.pl/bikol/docker-gpu-tests.git`
1. `cd docker-gpu-tests`
1. `sudo ./install.sh`
1. 'sudo docker-compose up`

43
docker-compose.yml Normal file
View File

@ -0,0 +1,43 @@
version: "3.8"
services:
test1:
image: stress-test
build:
context: ./
dockerfile: stressDockerfile
environment:
- NVIDIA_VISIBLE_DEVICES=all
working_dir: /gpu-burn
command:
[
"./gpu_burn",
"120"
]
deploy:
resources:
reservations:
devices:
- 'driver': 'nvidia'
'count': 1
'capabilities': ['gpu', 'utility', 'compute']
test2:
image: stress-test
build:
context: ./
dockerfile: stressDockerfile
environment:
- NVIDIA_VISIBLE_DEVICES=all
working_dir: /gpu-burn
command:
[
"./gpu_burn",
"120"
]
deploy:
resources:
reservations:
devices:
- 'driver': 'nvidia'
'count': 1
'capabilities': ['gpu', 'utility', 'compute']

13
install.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
sudo apt install python3
curl https://get.docker.com | sh && sudo systemctl start docker && sudo systemctl enable docker
docker --version
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pip3 install wheel
sudo pip3 install --upgrade git+https://github.com/docker/compose.git@854c003359bd07d0d3ca137d7a08509cfeab0436#egg=docker-compose
sudo systemctl restart docker

7
stress.Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM nvidia/cuda:10.2-devel
WORKDIR /
RUN apt update && apt install -y --no-install-recommends \
git build-essential
RUN git clone https://github.com/wilicc/gpu-burn.git
RUN cd gpu-burn && make