WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit eca373c

Browse files
committed
chore: add docker image for ib tools
Signed-off-by: Dmitry Shmulevich <[email protected]>
1 parent 9d3e3e3 commit eca373c

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

.github/workflows/docker.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on: workflow_dispatch
1010
env:
1111
REGISTRY: ghcr.io
1212
# github.repository as <account>/<repo>
13-
IMAGE_NAME: ${{ github.repository }}
13+
REPO_NAME: ${{ github.repository }}
1414

1515
jobs:
1616
build:
@@ -29,20 +29,6 @@ jobs:
2929
username: ${{ github.actor }}
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

32-
# Extract metadata (tags, labels) for Docker
33-
# https://github.com/docker/metadata-action
34-
- name: Extract Docker metadata
35-
id: meta
36-
uses: docker/metadata-action@v5
37-
with:
38-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39-
tags: |
40-
type=semver,pattern={{version}}
41-
type=semver,pattern={{major}}.{{minor}}
42-
type=semver,pattern={{major}}
43-
type=ref,event=branch
44-
type=sha,priority=100,prefix=,suffix=,format=short
45-
4632
# Set up QEMU for cross-platform builds
4733
- name: Set up QEMU
4834
uses: docker/setup-qemu-action@v3
@@ -51,18 +37,36 @@ jobs:
5137
- name: Set up Docker Buildx
5238
uses: docker/setup-buildx-action@v3
5339

40+
# Build and push Docker image with Buildx (don't push on PR)
41+
# https://github.com/docker/build-push-action
42+
#- name: Build and push app Docker image
43+
# id: build-and-push
44+
# uses: docker/build-push-action@v6
45+
# with:
46+
# context: .
47+
# file: ./Dockerfile
48+
# push: ${{ github.event_name != 'pull_request' }}
49+
#build-args: |
50+
# TARGETOS=linux
51+
# TARGETARCH=amd64
52+
# platforms: linux/amd64,linux/arm64
53+
# tags: |
54+
# ${{ env.REGISTRY }}/${{ github.repository }}/app:latest
55+
# ${{ env.REGISTRY }}/${{ github.repository }}/app:${{ github.sha }}
56+
5457
# Build and push Docker image with Buildx (don't push on PR)
5558
# https://github.com/docker/build-push-action
5659
- name: Build and push Docker image
5760
id: build-and-push
5861
uses: docker/build-push-action@v6
5962
with:
6063
context: .
61-
file: ./Dockerfile
64+
file: ./Dockerfile.ib
6265
push: ${{ github.event_name != 'pull_request' }}
6366
#build-args: |
6467
# TARGETOS=linux
6568
# TARGETARCH=amd64
6669
platforms: linux/amd64,linux/arm64
67-
tags: ${{ steps.meta.outputs.tags }}
68-
labels: ${{ steps.meta.outputs.labels }}
70+
tags: |
71+
${{ env.REGISTRY }}/nvidia/topograph/ib:latest
72+
${{ env.REGISTRY }}/nvidia/topograph/ib:${{ github.sha }}

Dockerfile.ib

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM debian:stable-slim
2+
3+
# Install dependencies and ibnetdiscover
4+
RUN apt-get update && \
5+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6+
infiniband-diags ibutils \
7+
&& apt-get clean \
8+
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)