Skip to content

update: Reduce image size #20

update: Reduce image size

update: Reduce image size #20

name: docker-build-cpu
on:
push:
branches:
- main
paths:
- 'dockerfiles/1.13.1-cpu-py3.10.11-ubuntu22.04/Dockerfile'
workflow_dispatch:
jobs:
build:
name: Build Docker Image ${{ matrix.dockerfile }}
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile:
- 1.13.1-cpu-py3.10.11-ubuntu22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./dockerfiles/${{ matrix.dockerfile }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: artrajz/pytorch:${{ matrix.dockerfile }}