Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Update actions. #345

Merged
merged 5 commits into from
Nov 20, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
name: Build & deploy Docker images

on:
schedule:
- cron: "0 6,18 * * *"
push:
paths:
- "docker/Dockerfile*"
Expand All @@ -18,20 +16,22 @@ jobs:
matrix:
distro: ["xenial", "bionic", "focal"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: ${{ format('Build {0} image (& Publish - Release Only)', matrix.distro) }}
uses: docker/build-push-action@v1
submodules: 'recursive'
- name: Docker login
uses: docker/login-action@v2
with:
username: edran
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ format('fairnle/nle-{0}', matrix.distro) }}
dockerfile: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: dev
- name: ${{ format('Build & Publish `dev` {0} image', matrix.distro) }}
uses: docker/build-push-action@v2
with:
file: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: ${{ format('fairnle/nle-{0}', matrix.distro) }}:latest
tag_with_sha: true
add_git_labels: true
push: ${{ github.ref == 'main' || ( github.event_name == 'release' && github.even.action == 'released' ) }}
push: false # Build on PR only.
- name: Check Version Matches Release Tag (Release Only)
if: github.event_name == 'release' && github.event.action == 'released'
run: |
Expand All @@ -40,12 +40,11 @@ jobs:
[[ "${{ github.event.release.tag_name }}" == "v$(cat version.txt)" ]]
- name: Push Version Tag (Release Only)
if: github.event_name == 'release' && github.event.action == 'released'
uses: docker/build-push-action@v1
uses: docker/build-push-action@v2
with:
username: edran
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ format('fairnle/nle-{0}', matrix.distro) }}
dockerfile: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: ${{ github.event.release.tag_name }},latest
file: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: |
${{ format('fairnle/nle-{0}', matrix.distro) }}:latest,
${{ format('fairnle/nle-{0}', matrix.distro) }}:${{ github.event.release.tag_name }}
add_git_labels: true
push: true
1 change: 1 addition & 0 deletions docker/Dockerfile-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04

ARG PYTHON_VERSION=3.8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub

RUN apt-get update && apt-get install -yq \
bison \
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile-focal
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# -*- mode: dockerfile -*-

FROM nvidia/cuda:11.0-devel-ubuntu20.04
FROM nvidia/cuda:11.4.3-devel-ubuntu20.04

ARG PYTHON_VERSION=3.8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub

cdmatters marked this conversation as resolved.
Show resolved Hide resolved

RUN apt-get update && apt-get install -yq \
bison \
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile-xenial
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu16.04
ARG PYTHON_VERSION=3.8
ENV DEBIAN_FRONTEND=noninteractive


cdmatters marked this conversation as resolved.
Show resolved Hide resolved
RUN apt-get update && apt-get install -yq \
apt-transport-https \
bison \
Expand Down