Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update build deps #17

Merged
merged 2 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build
name: Build and release
on:
pull_request:
push:
workflow_dispatch:

jobs:
Expand All @@ -15,15 +15,15 @@ jobs:
echo "speculosHash=$(git ls-remote https://github.com/LedgerHQ/speculos | head -n 1 | awk '{print $1}')" >> $GITHUB_OUTPUT
echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU # to build multitarget containers
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: src
platforms: linux/amd64,linux/arm64
push: false
push: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')) || github.event_name == 'workflow_dispatch' }}
tags: >-
zondax/builder-zemu:${{ steps.hash.outputs.hash }},
zondax/builder-zemu:latest,
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/publish.yml

This file was deleted.

9 changes: 5 additions & 4 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
# limitations under the License.
#*******************************************************************************

FROM python:3-slim
FROM python:3.9-slim

ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8

# Speculos build dependencies
RUN apt-get update && \
apt-get install -qy cmake curl gcc-arm-linux-gnueabihf \
git libc6-dev-armhf-cross libvncserver-dev qemu-user-static \
tesseract-ocr libtesseract-dev wget && \
git libc6-dev-armhf-cross libvncserver-dev python3-pip \
qemu-user-static tesseract-ocr libtesseract-dev wget \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could remove tesseract I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not using that now, but it's needed for legacy OCR, isn't it? Being just a py dependency, it seems reasonable to keep it.
Thanks for the review!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using a Speculos version >= 0.2.8, Tesseract it not used at all on it.
You can obviously keep it, but it is unused and just increase the image size for no reason.

gdb-multiarch binutils-arm-none-eabi && \
apt-get clean && rm -rf /var/lib/apt/lists/

RUN pip3 install ledgerblue construct flake8 flask flask_restful jsonschema mnemonic pycryptodome pyelftools pbkdf2 pytest Pillow requests pytesseract
RUN pip3 install ledgerblue construct flake8 flask flask_restful jsonschema mnemonic pycrypto pyelftools pbkdf2 pytest Pillow requests

# Create zondax user
RUN adduser --disabled-password --gecos "" -u 1000 zondax
Expand Down