Skip to content

Commit 150f1a8

Browse files
update docker files
1 parent 5ca0fa5 commit 150f1a8

File tree

4 files changed

+48
-7
lines changed

4 files changed

+48
-7
lines changed

.github/workflows/docker-publish-d.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
push_to_registry:
1010
name: Push Docker image
1111
runs-on: ubuntu-22.04
12+
strategy:
13+
matrix:
14+
image-tag: [ "CUDA-12.9.1-Ubuntu-2004", "CUDA-12.9.1-devel-ubi8" ]
1215
permissions:
1316
packages: write
1417
contents: read
@@ -28,7 +31,8 @@ jobs:
2831
id: meta
2932
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
3033
with:
31-
image: noobwastaken/tensor-array
34+
image: ${{ secrets.DOCKER_USERNAME }}/tensor-array
35+
tags: ${{ matrix.image-tag }}
3236

3337
- name: Build and push Docker images
3438
id: push
@@ -43,6 +47,6 @@ jobs:
4347
- name: Attest Build Provenance
4448
uses: actions/attest-build-provenance@v2
4549
with:
46-
subject-name: index.docker.io/noobwastaken/tensor-array
50+
subject-name: index.docker.io/${{ secrets.DOCKER_USERNAME }}/tensor-array
4751
subject-digest: ${{ steps.push.outputs.digest }}
4852
push-to-registry: true

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
image-os: [ "Ubuntu" ]
30+
image-tag: [ "CUDA-12.9.1-Ubuntu-20.04", "CUDA-12.9.1-devel-ubi8" ]
3131

3232
runs-on: ubuntu-22.04
3333

@@ -73,15 +73,16 @@ jobs:
7373
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
7474
with:
7575
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
76-
tags: ${{ matrix.image-os }}
76+
tags: |
77+
type=raw,value=${{ matrix.image-tag }}
7778
7879
# Build and push Docker image with Buildx (don't push on PR)
7980
# https://github.com/docker/build-push-action
8081
- name: Build and push Docker image
8182
id: build-and-push
8283
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
8384
with:
84-
file: Dockerfolder/${{ matrix.image-os }}.Dockerfile
85+
file: Dockerfolder/${{ matrix.image-tag }}.Dockerfile
8586
push: ${{ github.event_name != 'pull_request' }}
8687
tags: ${{ steps.meta.outputs.tags }}
8788
labels: ${{ steps.meta.outputs.labels }}

Dockerfolder/Ubuntu.Dockerfile renamed to Dockerfolder/CUDA-12.9.1-Ubuntu-20.04.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nvcr.io/nvidia/cuda:12.9.1-devel-ubuntu22.04
1+
FROM nvcr.io/nvidia/cuda:12.9.1-devel-ubuntu20.04
22

33
RUN apt-get update
44
RUN apt-get upgrade -y
@@ -30,5 +30,6 @@ WORKDIR tensor-array/build
3030
RUN cmake ..
3131
RUN cmake --build .
3232
RUN cmake --install .
33+
RUN ctest
3334

34-
WORKDIR /app/tensor-array
35+
WORKDIR ..
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM nvcr.io/nvidia/cuda:12.9.1-devel-ubi8
2+
3+
RUN apt-get update
4+
RUN apt-get upgrade -y
5+
RUN apt-get install curl -y
6+
7+
ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.27.9"
8+
9+
# Optionally install the cmake for vcpkg
10+
COPY scripts/packages-install/reinstall-cmake.sh /tmp/
11+
12+
RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
13+
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
14+
fi \
15+
&& rm -f /tmp/reinstall-cmake.sh
16+
17+
18+
# [Optional] Uncomment this section to install additional vcpkg ports.
19+
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
20+
21+
# [Optional] Uncomment this section to install additional packages.
22+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
23+
# && apt-get -y install --no-install-recommends <your-package-list-here>
24+
25+
WORKDIR /main-project
26+
COPY ./ tensor-array/
27+
28+
WORKDIR tensor-array/build
29+
30+
RUN cmake ..
31+
RUN cmake --build .
32+
RUN cmake --install .
33+
RUN ctest
34+
35+
WORKDIR ..

0 commit comments

Comments
 (0)