Skip to content

Commit

Permalink
Merge pull request #38 from Andrew-Su-0718/base
Browse files Browse the repository at this point in the history
[Feature][pull]: add config yml for syncing from dockerhub to ali mirror
  • Loading branch information
Andrew-Su-0718 authored Sep 6, 2024
2 parents f3aac65 + cc2c592 commit 4bb989e
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_base_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
IMAGE_NAME: jupyter
VERSION: base-cu11.8
VERSION: base-cu11.8-ubuntu22.04
DOCKERFILE: Dockerfile

jobs:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/docker_pull_ali.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Docker Image Pull

on:
push:
branches: [ "main" ]
paths: [
".github/workflows/docker_pull_ali.yml",
]
pull_request:
branches: [ "main" ]
types: [opened, synchronize, closed]
paths: [
".github/workflows/docker_pull_ali.yml",
]

env:
VERSION: 3.1.0

jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Pull Docker images xiaoyaliu/alist:latest for 20240820
run: docker pull xiaoyaliu/alist:latest --platform linux/amd64
- name: Tag Docker images xiaoyaliu/alist:latest for 20240820
run: docker tag xiaoyaliu/alist:latest registry.cn-hangzhou.aliyuncs.com/saz0568/alist:latest-amd64
- name: Pull Docker images xiaoyaliu/alist:latest for 20240820
run: docker pull xiaoyaliu/alist:latest --platform linux/arm/v7
- name: Tag Docker images xiaoyaliu/alist:latest for 20240820
run: docker tag xiaoyaliu/alist:latest registry.cn-hangzhou.aliyuncs.com/saz0568/alist:latest-armv7
- name: Log in to Ali mirror
run: echo "${{ secrets.ALIMIRROR_PASSWORD }}" | docker login registry.cn-hangzhou.aliyuncs.com --username=${{ secrets.ALIMIRROR_USERNAME }} --password-stdin
- name: Push Docker images xiaoyaliu/alist:latest for 20240820
run: docker push registry.cn-hangzhou.aliyuncs.com/saz0568/alist:latest-amd64
- name: Push Docker images xiaoyaliu/alist:latest for 20240820
run: docker push registry.cn-hangzhou.aliyuncs.com/saz0568/alist:latest-armv7
publish:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true }}
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
# - name: Pull Docker image from DockerHub
# run: docker pull saz0568/zelos-image:redis-stack-7.4.0-v0
# - name: Log in to zelos Harbor
# run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login harbor.zelostech.com.cn:5443 --username=${{ secrets.HARBOR_USERNAME }} --password-stdin
# - name: Tag Harbor images
# run: docker tag saz0568/zelos-image:redis-stack-7.4.0-v0 harbor.zelostech.com.cn:5443/devops/redis/redis-stack:7.4.0-v0
# - name: Push Harbor images
# run: docker push harbor.zelostech.com.cn:5443/devops/redis/redis-stack:7.4.0-v0
2 changes: 1 addition & 1 deletion base/cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# ARG BASE_IMG=nvcr.io/nvidia/cuda:11.4.3-cudnn8-devel-ubuntu20.04
ARG BASE_IMG=nvcr.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
ARG BASE_IMG=nvcr.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
FROM $BASE_IMG

ARG TARGETARCH=amd64
Expand Down

0 comments on commit 4bb989e

Please sign in to comment.