From e0f11b7156fbcb2e841e06c5abe70d83703553d7 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 19 Sep 2023 23:17:54 -0500 Subject: [PATCH 1/6] Initial image based on ubuntu/risc --- .github/workflows/build-ubuntu-22.04-risc.yml | 30 +++++++++++++++++++ ubuntu-22.04-risc/Dockerfile | 13 ++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/build-ubuntu-22.04-risc.yml create mode 100644 ubuntu-22.04-risc/Dockerfile diff --git a/.github/workflows/build-ubuntu-22.04-risc.yml b/.github/workflows/build-ubuntu-22.04-risc.yml new file mode 100644 index 0000000..180c531 --- /dev/null +++ b/.github/workflows/build-ubuntu-22.04-risc.yml @@ -0,0 +1,30 @@ +name: Build Ubuntu 22.04 RISC Image + +on: + push: + branches: + - main + paths: + - 'ubuntu-22.04-risc/*' + - '.github/workflows/build-ubuntu-22.04-risc.yml' + pull_request: + workflow_dispatch: + schedule: + - cron: '30 12 * * 5' + +concurrency: + # SHA is added to the end if on `main` to let all main workflows run + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }} + cancel-in-progress: true + +jobs: + build: + uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main + with: + docker-context: "./ubuntu-22.04-risc" + dockerfile: "./ubuntu-22.04-risc/Dockerfile" + dockerhub_imagename: "chianetwork/ubuntu-22.04-risc-builder" + docker-platforms: linux/riscv64 + secrets: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }} diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile new file mode 100644 index 0000000..bb7db80 --- /dev/null +++ b/ubuntu-22.04-risc/Dockerfile @@ -0,0 +1,13 @@ +FROM riscv64/ubuntu:focal + +ENV PYENV_ROOT=/root/.pyenv +ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" + +RUN apt-get install -y curl make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev \ +# && \ +# curl https://pyenv.run | bash && \ +# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ +# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ +# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \ +# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \ +# pyenv global 3.11 From 288f4c3008701c2806bff4806c3edb89b5085665 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 19 Sep 2023 23:21:41 -0500 Subject: [PATCH 2/6] Apt-get update... --- ubuntu-22.04-risc/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index bb7db80..1b53eae 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -3,7 +3,8 @@ FROM riscv64/ubuntu:focal ENV PYENV_ROOT=/root/.pyenv ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" -RUN apt-get install -y curl make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev \ +RUN apt-get update && \ + apt-get install -y curl make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev \ # && \ # curl https://pyenv.run | bash && \ # PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ From 02b18859b0f8e79198de963441346ea813b263b2 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 19 Sep 2023 23:24:22 -0500 Subject: [PATCH 3/6] Install all the pythons --- ubuntu-22.04-risc/Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 1b53eae..4a09d44 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -4,11 +4,10 @@ ENV PYENV_ROOT=/root/.pyenv ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN apt-get update && \ - apt-get install -y curl make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev \ -# && \ -# curl https://pyenv.run | bash && \ -# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ -# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ -# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \ -# PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \ -# pyenv global 3.11 + apt-get install -y curl make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev && \ + curl https://pyenv.run | bash && \ + PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ + PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ + PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \ + PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \ + pyenv global 3.11 From a80500b40071293aa9bea0f26d02d7ba9eae8886 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 19 Sep 2023 23:27:03 -0500 Subject: [PATCH 4/6] Add git --- ubuntu-22.04-risc/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 4a09d44..98f275a 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -4,7 +4,7 @@ ENV PYENV_ROOT=/root/.pyenv ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN apt-get update && \ - apt-get install -y curl make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev && \ + apt-get install -y curl git make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev && \ curl https://pyenv.run | bash && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ From dad38b78a2a8373b22297220352b6fe0dfdbe86a Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Tue, 19 Sep 2023 23:30:49 -0500 Subject: [PATCH 5/6] Add build essential --- ubuntu-22.04-risc/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 98f275a..575ba73 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -4,7 +4,7 @@ ENV PYENV_ROOT=/root/.pyenv ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN apt-get update && \ - apt-get install -y curl git make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev && \ + apt-get install -y build-essential curl git make libssl-dev zlib1g zlib1g-dev libreadline-dev libffi-dev && \ curl https://pyenv.run | bash && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ From d88229aa921e836733bb14dfc04754bfa0f590fa Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Wed, 20 Sep 2023 08:32:29 -0500 Subject: [PATCH 6/6] Add rust --- ubuntu-22.04-risc/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ubuntu-22.04-risc/Dockerfile b/ubuntu-22.04-risc/Dockerfile index 575ba73..22cd4c8 100644 --- a/ubuntu-22.04-risc/Dockerfile +++ b/ubuntu-22.04-risc/Dockerfile @@ -10,4 +10,10 @@ RUN apt-get update && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \ PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \ - pyenv global 3.11 + pyenv global 3.11 && \ + rm -rf /var/lib/apt/lists/* + +ENV PATH="/root/.cargo/bin:${PATH}" +ENV RUST_BACKTRACE=1 + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y