Skip to content

Commit 94cd0d2

Browse files
committed
Rewrite docker & docker-compose files
1 parent fba8268 commit 94cd0d2

5 files changed

Lines changed: 11 additions & 15 deletions

File tree

.github/workflows/ci_docker_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
run: |
7070
docker version
7171
docker buildx version
72-
docker compose build --no-cache
72+
docker compose build
7373
7474
- name: Run C++ tests
7575
run: docker run --rm qsim-cxx-tests:latest

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base OS
2-
FROM ubuntu:24.04
2+
FROM ubuntu:24.04 as qsim-base
33

44
# Allow passing this variable in from the outside.
55
ARG CUDA_PATH

docker-compose.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
services:
2-
qsim-base:
2+
qsim-base-image:
33
platform: linux/amd64
4-
image: qsim
5-
container_name: qsim
4+
image: qsim-base
65
build:
76
context: ./
87
dockerfile: Dockerfile
8+
target: qsim-base
99

1010
qsim-cxx-tests:
11-
platform: linux/amd64
12-
image: qsim-cxx-tests
13-
container_name: qsim-cxx-tests
1411
build:
1512
context: ./
1613
dockerfile: tests/Dockerfile
14+
target: qsim-cxx-tests
1715
depends_on:
18-
- qsim-base
16+
- qsim-base-image
1917

2018
qsim-py-tests:
21-
platform: linux/amd64
22-
image: qsim-py-tests
23-
container_name: qsim-py-tests
2419
build:
2520
context: ./
2621
dockerfile: pybind_interface/Dockerfile
22+
target: qsim-py-tests
2723
depends_on:
28-
- qsim-base
24+
- qsim-base-image

pybind_interface/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base OS
2-
FROM qsim
2+
FROM qsim-base as qsim-py-tests
33

44
# Copy relevant files
55
COPY ./pybind_interface/ /qsim/pybind_interface/

tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base OS
2-
FROM qsim
2+
FROM qsim-base as qsim-cxx-tests
33

44
# Copy relevant files
55
COPY ./tests/ /qsim/tests/

0 commit comments

Comments
 (0)