-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (76 loc) · 2.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (76 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3.8'
services:
# Development environment with full project mounted
dev:
build:
context: .
dockerfile: Dockerfile
image: pim-matmul-dev:latest
platform: linux/amd64
container_name: pim-matmul-dev
volumes:
- .:/workspace
- /workspace/.venv # Prevent mounting venv from host
working_dir: /workspace
environment:
- PIM_MATMUL_BENCHMARKS_ROOT=/workspace
- PKG_CONFIG_PATH=/opt/upmem-2023.2.0-Linux-x86_64/share/pkgconfig
- LD_LIBRARY_PATH=/opt/upmem-2023.2.0-Linux-x86_64/lib:/usr/lib/x86_64-linux-gnu
command: /bin/bash
stdin_open: true
tty: true
# Build target - compiles the project
build:
build:
context: .
dockerfile: Dockerfile
image: pim-matmul-dev:latest
platform: linux/amd64
container_name: pim-matmul-build
volumes:
- .:/workspace
- build-cache:/workspace/build
- bin-cache:/workspace/bin
working_dir: /workspace
environment:
- PIM_MATMUL_BENCHMARKS_ROOT=/workspace
- PKG_CONFIG_PATH=/opt/upmem-2023.2.0-Linux-x86_64/share/pkgconfig
- LD_LIBRARY_PATH=/opt/upmem-2023.2.0-Linux-x86_64/lib:/usr/lib/x86_64-linux-gnu
command: >
/bin/bash -c "
source /opt/upmem-2023.2.0-Linux-x86_64/upmem_env.sh simulator &&
source /workspace/source.me &&
mkdir -p /workspace/build/ &&
cmake -S /workspace/ -B /workspace/build/ &&
make -C /workspace/build/ all
"
# Unit test target - runs all tests
unittest:
build:
context: .
dockerfile: Dockerfile
image: pim-matmul-dev:latest
platform: linux/amd64
container_name: pim-matmul-unittest
volumes:
- .:/workspace
- build-cache:/workspace/build
- bin-cache:/workspace/bin
working_dir: /workspace
environment:
- PIM_MATMUL_BENCHMARKS_ROOT=/workspace
- PKG_CONFIG_PATH=/opt/upmem-2023.2.0-Linux-x86_64/share/pkgconfig
- LD_LIBRARY_PATH=/opt/upmem-2023.2.0-Linux-x86_64/lib:/usr/lib/x86_64-linux-gnu
command: >
/bin/bash -c "
source /opt/upmem-2023.2.0-Linux-x86_64/upmem_env.sh simulator &&
source /workspace/source.me &&
mkdir -p /workspace/build/ &&
cmake -S /workspace/ -B /workspace/build/ &&
make -C /workspace/build/ tests &&
ctest --output-on-failure -C Debug -V -E integration &&
echo 'All unit tests passed successfully'
"
volumes:
build-cache:
bin-cache: