Skip to content

Commit 3102dcd

Browse files
GenAIGenAI
authored andcommitted
Apply ai1 implementation for task recH8bl3pxfq6A8Ch
1 parent 8ce6ff5 commit 3102dcd

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed

.github/workflows/release.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,50 @@ jobs:
5757
- name: publish to pypi
5858
uses: pypa/gh-action-pypi-publish@release/v1
5959
if: startsWith(github.ref, 'refs/tags/')
60+
61+
build-docker-images:
62+
runs-on: ubuntu-22.04
63+
permissions:
64+
contents: read
65+
strategy:
66+
fail-fast: false
67+
matrix:
68+
vncserver: [tigervnc, turbovnc]
69+
steps:
70+
- uses: actions/checkout@v4
71+
with:
72+
fetch-depth: 0
73+
74+
- name: Calculate image tags
75+
id: tags
76+
uses: jupyterhub/action-major-minor-tag-calculator@v3
77+
with:
78+
githubToken: ${{ github.token }}
79+
prefix: ""
80+
suffix: "-${{ matrix.vncserver }}"
81+
82+
- name: Set up QEMU
83+
uses: docker/setup-qemu-action@v3
84+
85+
- name: Set up Docker Buildx
86+
uses: docker/setup-buildx-action@v3
87+
88+
- name: Login to Quay.io
89+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
90+
uses: docker/login-action@v3
91+
with:
92+
registry: quay.io
93+
username: ${{ secrets.QUAY_USERNAME }}
94+
password: ${{ secrets.QUAY_PASSWORD }}
95+
96+
- name: Build and push Docker image
97+
uses: docker/build-push-action@v6
98+
with:
99+
context: .
100+
platforms: linux/amd64,linux/arm64
101+
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
102+
tags: ${{ steps.tags.outputs.tags }}
103+
build-args: |
104+
vncserver=${{ matrix.vncserver }}
105+
cache-from: type=gha,scope=${{ matrix.vncserver }}
106+
cache-to: type=gha,mode=max,scope=${{ matrix.vncserver }}

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM quay.io/jupyter/base-notebook:latest
22

3+
ARG vncserver=tigervnc
4+
35
USER root
46

57
RUN apt-get -y -qq update \
@@ -12,8 +14,16 @@ RUN apt-get -y -qq update \
1214
xorg \
1315
xubuntu-icon-theme \
1416
fonts-dejavu \
15-
tigervnc-standalone-server \
16-
tigervnc-xorg-extension \
17+
&& if [ "$vncserver" = "tigervnc" ]; then \
18+
apt-get -y -qq install tigervnc-standalone-server tigervnc-xorg-extension; \
19+
elif [ "$vncserver" = "turbovnc" ]; then \
20+
ARCH="$(dpkg --print-architecture)" \
21+
&& curl -sSL "https://sourceforge.net/projects/turbovnc/files/3.1.2/turbovnc_3.1.2_${ARCH}.deb/download" -o /tmp/turbovnc.deb \
22+
&& apt-get -y -qq install /tmp/turbovnc.deb \
23+
&& rm /tmp/turbovnc.deb; \
24+
else \
25+
echo "Invalid vncserver argument: $vncserver. Must be 'tigervnc' or 'turbovnc'." && exit 1; \
26+
fi \
1727
# Disable the automatic screenlock since the account password is unknown
1828
&& apt-get -y -qq remove xfce4-screensaver \
1929
# chown $HOME to workaround that the xorg installation creates a

0 commit comments

Comments
 (0)