Skip to content

Commit 281c199

Browse files
authored
chore: switch the image to Python 3.14 on Debian 13 (trixie) (#44)
The published image carried an outdated CA store and rejected certificates chaining to newer public roots. torch goes to 2.9.1, which has Python 3.14 wheels and still uses CUDA 12.8 and ROCm 6.4. CI now tests against AppAPI main and deploys the image built from the checkout. Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
1 parent a3eff9e commit 281c199

2 files changed

Lines changed: 25 additions & 11 deletions

File tree

‎.github/workflows/test-deploy.yml‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
repository: nextcloud/server
4444
ref: master
4545

46+
- name: Checkout AppAPI
47+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
48+
with:
49+
path: apps/app_api
50+
repository: nextcloud/app_api
51+
ref: main
52+
4653
- name: Checkout Test Deploy
4754
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4855
with:
@@ -72,10 +79,18 @@ jobs:
7279
./occ config:system:set debug --value=true --type=boolean
7380
./occ app:enable --force app_api
7481
82+
- name: Build image
83+
run: |
84+
IMAGE="$(php -r '$d = simplexml_load_file($argv[1])->{"external-app"}->{"docker-install"}; echo $d->registry . "/" . $d->image . ":" . $d->{"image-tag"};' apps/${{ env.APP_NAME }}/appinfo/info.xml)"
85+
echo "Building $IMAGE"
86+
docker build --build-arg BUILD_TYPE=cpu -t "$IMAGE" apps/${{ env.APP_NAME }}
87+
7588
- name: Test deploy
7689
run: |
7790
PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 &
7891
./occ app_api:daemon:register docker_local_sock Docker docker-install http /var/run/docker.sock http://127.0.0.1:8080/index.php
92+
# Deploy the image built above instead of pulling the published one
93+
./occ app_api:daemon:registry:add docker_local_sock --registry-from ghcr.io --registry-to local
7994
./occ app_api:app:register ${{ env.APP_NAME }} docker_local_sock \
8095
--info-xml apps/${{ env.APP_NAME }}/appinfo/info.xml
8196
./occ app_api:app:enable ${{ env.APP_NAME }}
@@ -89,11 +104,10 @@ jobs:
89104
90105
- name: Check logs
91106
run: |
92-
grep -q 'Started' container.log || error
93-
grep -q 'Connect to Nextcloud was successful' container.log || error
94-
grep -q 'enabled_handler: enabled=True' container.log || error
95-
grep -q 'enabled_handler: enabled=False' container.log || error
96-
grep -q 'Running on CPU' container.log || error
107+
for expected in 'Started' 'Connect to Nextcloud was successful' \
108+
'enabled_handler: enabled=True' 'enabled_handler: enabled=False' 'Running on CPU'; do
109+
grep -q "$expected" container.log || { echo "::error::Not found in the container log: $expected"; exit 1; }
110+
done
97111
98112
- name: Unregister App & Daemon
99113
run: |

‎Dockerfile‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/python:3.12-slim-bookworm AS builder
1+
FROM docker.io/python:3.14-slim-trixie AS builder
22

33
RUN apt-get update && apt-get install -y curl && \
44
apt-get clean && rm -rf /var/lib/apt/lists/*
@@ -42,19 +42,19 @@ RUN --mount=type=cache,target=/root/.cache/pip \
4242
ARCH=$(uname -m) && \
4343
if [ "$ARCH" = "aarch64" ]; then \
4444
echo "Installing PyTorch for ARM64"; \
45-
python3 -m pip install --root-user-action=ignore torch==2.8.0 torchvision; \
45+
python3 -m pip install --root-user-action=ignore torch==2.9.1 torchvision; \
4646
elif [ "$BUILD_TYPE" = "rocm" ]; then \
47-
python3 -m pip install --root-user-action=ignore torch==2.8.0 torchvision --index-url https://download.pytorch.org/whl/rocm6.4; \
47+
python3 -m pip install --root-user-action=ignore torch==2.9.1 torchvision --index-url https://download.pytorch.org/whl/rocm6.4; \
4848
elif [ "$BUILD_TYPE" = "cpu" ]; then \
49-
python3 -m pip install --root-user-action=ignore torch==2.8.0 torchvision --index-url https://download.pytorch.org/whl/cpu; \
49+
python3 -m pip install --root-user-action=ignore torch==2.9.1 torchvision --index-url https://download.pytorch.org/whl/cpu; \
5050
else \
51-
python3 -m pip install --root-user-action=ignore torch==2.8.0 torchvision; \
51+
python3 -m pip install --root-user-action=ignore torch==2.9.1 torchvision; \
5252
fi
5353

5454
RUN --mount=type=cache,target=/root/.cache/pip \
5555
python3 -m pip install --root-user-action=ignore -r requirements.txt && rm requirements.txt
5656

57-
FROM python:3.12-slim-bookworm
57+
FROM python:3.14-slim-trixie
5858

5959
COPY --from=builder /usr/local/ /usr/local/
6060

0 commit comments

Comments
 (0)