Skip to content

Commit c2eef41

Browse files
committed
release 2506.1
0 parents  commit c2eef41

16 files changed

+1408
-0
lines changed

.env-dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# shellcheck disable=SC2034,SC2148
2+
# https://docs.docker.com/compose/env-file/
3+
# format VAR=VAL
4+
# There is no special handling of quotation marks. This means that they are
5+
# part of the VAL. don't do VAR=''
6+
# build
7+
IMG_PYTHON_VERSION=3.12
8+
USER=gordon
9+
USER_ID=1000
10+
USER_GID=1000
11+
APT_PROXY=
12+
# runtime
13+
IMAGE_VERSION=2506.1
14+
LISTEN_PORT=8888
15+
#BYODF=/home/gordon/Notebooks/etc/dotfiles
16+
BYODF=
17+
#SSH_KEYDIR=/home/gordon/Notebooks/etc/ssh
18+
SSH_KEYDIR=
19+
PIP_REQUIRE_VIRTUALENV=
20+
QUANT_TZ=Europe/Zurich
21+
#START_SCRIPTS=/home/gordon/Notebooks/etc/start_scripts
22+
#SSH_PASSPHRASE=
23+
#SSH_PASSPHRASE_FILE=/run/secrets/ssh_passphrase

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "docker" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
time: "04:00"
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
time: "04:10"
18+
- package-ecosystem: "pip" # See documentation for possible values
19+
directory: "/" # Location of package manifests
20+
schedule:
21+
interval: "daily"
22+
time: "04:20"
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: Check docker image
2+
3+
on:
4+
schedule:
5+
- cron: '20 4 * * *' # every day at 420 am
6+
workflow_dispatch:
7+
8+
env:
9+
IMAGE_NAME: gnzsnz/jupyter-quant
10+
GH_IMAGE_NAME: ghcr.io/quantbelt/jupyter-quant
11+
BASE_IMAGE: python
12+
PLATFORMS: linux/amd64,linux/arm64
13+
14+
jobs:
15+
check_base:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
needs-updating: ${{ steps.check.outputs.needs-updating }}
19+
steps:
20+
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Get enviroment variables
25+
run: |
26+
grep -v '#' .env-dist | grep '=' > .env
27+
while IFS= read -r line; do
28+
echo $line >> $GITHUB_ENV ;
29+
done < .env
30+
31+
- name: Check if update available
32+
id: check
33+
uses: lucacome/docker-image-update-checker@v2
34+
with:
35+
base-image: ${{ env.BASE_IMAGE }}:${{ env.IMG_PYTHON_VERSION }}-slim
36+
image: ${{ env.IMAGE_NAME}}:${{ env.IMAGE_VERSION }}
37+
platforms: ${{ env.PLATFORMS }}
38+
39+
- name: Set up QEMU
40+
uses: docker/setup-qemu-action@v3
41+
with:
42+
platforms: ${{ env.PLATFORMS }}
43+
44+
- name: Set up Docker Buildx
45+
uses: docker/setup-buildx-action@v3
46+
47+
- name: Docker metadata
48+
id: meta
49+
uses: docker/metadata-action@v5
50+
with:
51+
images: |
52+
${{ env.IMAGE_NAME }}
53+
${{ env.GH_IMAGE_NAME }}
54+
flavor: |
55+
latest=true
56+
57+
- name: Build Docker image
58+
uses: docker/build-push-action@v6
59+
with:
60+
push: false
61+
load: false
62+
cache-from: type=gha
63+
cache-to: type=gha,mode=max
64+
context: .
65+
build-args: |
66+
USER=${{ env.USER }}
67+
USER_ID=${{ env.USER_ID }}
68+
USER_GID=${{ env.USER_GID }}
69+
IMG_PYTHON_VERSION=${{ env.IMG_PYTHON_VERSION}}
70+
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
71+
labels: ${{ steps.meta.outputs.labels }}
72+
73+
build:
74+
runs-on: ubuntu-latest
75+
needs: check_base
76+
if: needs.check_base.outputs.needs-updating == 'true'
77+
steps:
78+
79+
- name: Checkout
80+
uses: actions/checkout@v4
81+
82+
- name: Get enviroment variables
83+
run: |
84+
grep -v '#' .env-dist | grep '=' > .env
85+
while IFS= read -r line; do
86+
echo $line >> $GITHUB_ENV ;
87+
done < .env
88+
89+
- name: Create issue
90+
id: create_issue
91+
env:
92+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
run: |
94+
title="Base images updates found for ${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}"
95+
body="A new build&publish might be needed."
96+
97+
exists=$(gh issue list -S "is:issue state:open in:title $title" | wc -l)
98+
99+
if [ -n "$exists" ] && [ "$exists" -gt 0 ]; then
100+
echo "dup_issue=yes" >> $GITHUB_OUTPUT
101+
else
102+
gh issue create -t "$title" -b "$body"
103+
echo "dup_issue=no" >> $GITHUB_OUTPUT
104+
fi
105+
106+
- name: Set up QEMU
107+
uses: docker/setup-qemu-action@v3
108+
if: ${{ steps.create_issue.outputs.dup_issue == 'no' }}
109+
with:
110+
platforms: ${{ env.PLATFORMS }}
111+
112+
- name: Set up Docker Buildx
113+
uses: docker/setup-buildx-action@v3
114+
if: ${{ steps.create_issue.outputs.dup_issue == 'no' }}
115+
116+
- name: Docker metadata
117+
id: meta
118+
if: ${{ steps.create_issue.outputs.dup_issue == 'no' }}
119+
uses: docker/metadata-action@v5
120+
with:
121+
images: |
122+
${{ env.IMAGE_NAME }}
123+
${{ env.GH_IMAGE_NAME }}
124+
flavor: |
125+
latest=true
126+
127+
- name: Build Docker image
128+
uses: docker/build-push-action@v6
129+
if: ${{ steps.create_issue.outputs.dup_issue == 'no' }}
130+
with:
131+
push: false
132+
load: false
133+
cache-from: type=gha
134+
cache-to: type=gha,mode=max
135+
context: .
136+
build-args: |
137+
USER=${{ env.USER }}
138+
USER_ID=${{ env.USER_ID }}
139+
USER_GID=${{ env.USER_GID }}
140+
IMG_PYTHON_VERSION=${{ env.IMG_PYTHON_VERSION}}
141+
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
142+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build 🛠️ and test 🧪 jupyter-quant Docker Image and pypi package 📦
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ "master", "dev" ]
7+
pull_request:
8+
branches: [ "master" ]
9+
10+
env:
11+
IMAGE_NAME: gnzsnz/jupyter-quant
12+
GH_IMAGE_NAME: ghcr.io/quantbelt/jupyter-quant
13+
PLATFORMS: linux/amd64,linux/arm64
14+
PACKAGE_NAME: jupyter-quant
15+
16+
jobs:
17+
py_build:
18+
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
python-version: ['3.11', '3.12']
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
cache: pip
31+
# You can test your matrix by printing the current Python version
32+
- name: Display Python version
33+
run: python -c "import sys; print(sys.version)"
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --user -U build pip setuptools wheel
37+
- name: Build a binary wheel and a source tarball
38+
run: python3 -m build
39+
40+
docker_buildntest:
41+
name: Build and test
42+
43+
runs-on: ubuntu-latest
44+
continue-on-error: true
45+
46+
steps:
47+
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Get enviroment variables
52+
run: |
53+
grep -v '#' .env-dist | grep '=' > .env
54+
while IFS= read -r line; do
55+
echo $line >> $GITHUB_ENV ;
56+
done < .env
57+
58+
- name: Set up QEMU
59+
uses: docker/setup-qemu-action@v3
60+
with:
61+
platforms: ${{ env.PLATFORMS }}
62+
63+
- name: Set up Docker Buildx
64+
uses: docker/setup-buildx-action@v3
65+
66+
- name: Docker metadata
67+
id: meta
68+
uses: docker/metadata-action@v5
69+
with:
70+
images: |
71+
${{ env.IMAGE_NAME }}
72+
${{ env.GH_IMAGE_NAME }}
73+
flavor: |
74+
latest=true
75+
76+
- name: Build Docker image
77+
uses: docker/build-push-action@v6
78+
with:
79+
push: false
80+
load: false
81+
cache-from: type=gha
82+
cache-to: type=gha,mode=max
83+
context: .
84+
platforms: ${{ env.PLATFORMS }}
85+
build-args: |
86+
USER=${{ env.USER }}
87+
USER_ID=${{ env.USER_ID }}
88+
USER_GID=${{ env.USER_GID }}
89+
IMG_PYTHON_VERSION=${{ env.IMG_PYTHON_VERSION}}
90+
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
91+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)