Skip to content

Commit

Permalink
Revert to upstream Docker-enabled multi-arch builds and using Nuitka …
Browse files Browse the repository at this point in the history
…for compilation
  • Loading branch information
nemuelw committed Nov 18, 2024
1 parent b1be038 commit 1383f29
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
max-line-length = 110
exclude =
.venv/*
app.build/*
app.build/*
app.dist/*
app.onefile-build/*
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,22 @@ jobs:
- name: Run flake8
run: |
flake8 .
multiarch-build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker image
run: |
docker build --platform linux/${{ matrix.arch }} -t protodesk .
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.vscode/
.venv/
__pycache__/
app.build/
app.dist/
app.onefile-build/
protodesk
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.12-bullseye

WORKDIR /app

RUN apt-get update && apt-get install -y patchelf

COPY . /app

# create and activate a virtual environment
RUN python -m venv .venv && chmod +x .venv/bin/activate && .venv/bin/activate

# install project dependencies
RUN pip3 install -r requirements.txt

# build the app with Nuitka
RUN nuitka --enable-plugin=pyside6 --include-data-dir=./assets=./assets --standalone --onefile --lto=yes --output-filename=protodesk app.py
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
flake8==7.1.1
mccabe==0.7.0
Nuitka==2.5
ordered-set==4.1.0
pycodestyle==2.12.1
pyflakes==3.2.0
Expand Down

0 comments on commit 1383f29

Please sign in to comment.