Skip to content

Commit f1e7455

Browse files
committed
Fix container workflow.
[ci skip]
1 parent b4d4284 commit f1e7455

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

.github/workflows/Container.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ jobs:
2727

2828
strategy:
2929
matrix:
30-
julia: ["1.10", "1.11"]
31-
cuda: ["11.8", "12.6"]
30+
julia: ["1.11", "1.12"]
31+
cuda: ["11.8", "12.9", "13.2"]
3232
platform: ["linux/amd64"]
3333
os: ["ubuntu-24.04"]
3434
include:
35-
- julia: "1.11"
36-
cuda: "12.6"
35+
- julia: "1.12"
36+
cuda: "13.2"
3737
platform: "linux/amd64"
3838
os: "ubuntu-24.04"
3939
default: true
40-
- julia: "1.11"
41-
cuda: "12.6"
40+
- julia: "1.12"
41+
cuda: "13.2"
4242
platform: "linux/arm64"
4343
os: "ubuntu-24.04-arm"
4444
default: true
@@ -48,28 +48,21 @@ jobs:
4848
steps:
4949
- name: Check out the repo
5050
uses: actions/checkout@v6
51-
52-
- name: Check out the package
53-
uses: actions/checkout@v6
5451
with:
55-
ref: ${{ inputs.ref || github.ref_name }}
56-
path: package
52+
ref: ${{ inputs.tag || github.ref_name }}
5753

5854
- name: Get package spec
5955
id: pkg
6056
run: |
6157
if [[ -n "${{ inputs.tag }}" ]]; then
62-
echo "ref=${{ inputs.tag }}" >> $GITHUB_OUTPUT
6358
echo "name=${{ inputs.tag }}" >> $GITHUB_OUTPUT
6459
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
65-
echo "ref=${{ github.ref_name }}" >> $GITHUB_OUTPUT
6660
echo "name=${{ github.ref_name }}" >> $GITHUB_OUTPUT
6761
else
68-
echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT
6962
echo "name=dev" >> $GITHUB_OUTPUT
7063
fi
7164
72-
VERSION=$(grep "^version = " package/Project.toml | cut -d'"' -f2)
65+
VERSION=$(grep "^version = " Project.toml | cut -d'"' -f2)
7366
echo "version=$VERSION" >> $GITHUB_OUTPUT
7467
7568
- name: Get CUDA major version
@@ -115,12 +108,11 @@ jobs:
115108
with:
116109
context: .
117110
push: true
118-
provenance: false # the build fetches the repo again, so provenance tracking is not useful
111+
provenance: false
119112
platforms: ${{ matrix.platform }}
120113
tags: ${{ steps.meta.outputs.tags }}
121114
labels: ${{ steps.meta.outputs.labels }}
122115
build-args: |
123116
JULIA_VERSION=${{ matrix.julia }}
124117
CUDA_VERSION=${{ matrix.cuda }}
125-
PACKAGE_SPEC=CUDA#${{ steps.pkg.outputs.ref }}
126118
JULIA_CPU_TARGET=${{ steps.cpu_target.outputs.target }}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ ENV JULIA_CPU_TARGET=${JULIA_CPU_TARGET}
1515

1616
ARG CUDA_VERSION=12.6
1717

18-
ARG PACKAGE_SPEC=CUDA
19-
2018
LABEL org.opencontainers.image.authors="Tim Besard <tim.besard@gmail.com>" \
2119
org.opencontainers.image.description="A CUDA.jl container with CUDA ${CUDA_VERSION} and Julia ${JULIA_VERSION}" \
2220
org.opencontainers.image.title="CUDA.jl" \
@@ -55,8 +53,10 @@ RUN julia -e '#= make bundled depot non-writable (JuliaLang/Pkg.jl#4120) =# \
5553
touch -h -d "@0" /usr/local/share
5654

5755
# install CUDA.jl itself
58-
RUN julia -e 'using Pkg; pkg"add '${PACKAGE_SPEC}'"; \
56+
COPY . /tmp/package
57+
RUN julia -e 'using Pkg; Pkg.develop(path="/tmp/package"); \
5958
using CUDA; CUDA.precompile_runtime()' && \
59+
rm -rf /tmp/package && \
6060
#= remove useless stuff =# \
6161
cd /usr/local/share/julia && \
6262
rm -rf registries scratchspaces logs

0 commit comments

Comments
 (0)