Skip to content

Docker Build

Docker Build #3

Workflow file for this run

name: Docker Build
on:
workflow_dispatch:
push:
branches: [ "main" ]
env:
UBUNTU_VERSION: 22.04
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
LATEST_CUDA: "pytorch-2.0.1-py3.10-cuda-11.8.0-base-22.04"
LATEST_CUDA_JUPYTER: "jupyter-pytorch-2.0.1-py3.10-cuda-11.8.0-base-22.04"
jobs:
nvidia-base:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
base:
- "pytorch"
- "jupyter-pytorch"
python:
- "3.10"
- "3.11"
pytorch:
- "2.0.1"
cuda:
- "11.7.1"
- "11.8.0"
level:
- "base"
- "cudnn8-devel"
steps:
-
name: Free Space
run: |
df -h
rm -rf /usr/share/dotnet
rm -rf /opt/ghc
rm -rf /usr/local/share/boost
rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
-
name: Env Setter
run: |
echo "PACKAGE_NAME=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set tags
run: |

Check failure on line 59 in .github/workflows/docker-build.yml

View workflow run for this annotation

GitHub Actions / Docker Build

Invalid workflow file

The workflow is not valid. .github/workflows/docker-build.yml (Line: 59, Col: 14): Unrecognized named-value: 'base'. Located at position 1 within expression: base
img_path="ghcr.io/${{ env.PACKAGE_NAME }}"
ver_tag="${{ base }}-${{ matrix.pytorch }}-py${{ matrix.python }}-cuda-${{ matrix.cuda }}-${{ matrix.level }}-${{ env.UBUNTU_VERSION }}"
if [[ $ver_tag == ${{ env.LATEST_CUDA }} ]]; then
TAGS="${img_path}:latest, ${img_path}:latest-cuda, ${img_path}:$ver_tag"
elif [[ $ver_tag == ${{ env.LATEST_CUDA_JUPYTER }} ]]; then
TAGS="${img_path}:latest-jupyter, ${img_path}:latest-cuda-jupyter, ${img_path}:$ver_tag"
else
TAGS="${img_path}:$ver_tag"
fi
echo "TAGS=${TAGS}" >> ${GITHUB_ENV}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: build
build-args: |
IMAGE_BASE=ghcr.io/ai-dock/${{ matrix.base }}:${{ matrix.pytorch }}-py${{ matrix.python }}-cuda-${{ matrix.cuda }}-${{ matrix.level }}-${{ env.UBUNTU_VERSION }}
push: true
provenance: false
tags: ${{ env.TAGS }}