Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 294ad9f

Browse files
author
Chris Eckhardt
committed
Fix dependencies to build on ARM
Updates many dependencies to enable sawtooth validator to build and run on ARM. Fixes a memory leak that occurs when using the currently published image on ARM. Some packages that were pulled in via apt install (ex. python3-pyformance, python3-grpcio, etc.) aren't published for ARM, so we need to install them via pip. To install them via pip, we need to lock versions for some of the packages to continue to use python3.6 and be compatible with Grid. Some packages need to be up-to-date and not version-locked. Installing packages via pip is done in steps, as some packages need to be finished installing before calling `pip install ...` for others. This also removes the dependency declarations in `setup.py` and `stdeb.cfg` files, as these mostly refer to packages without compatible ARM versions published. They are also silent failures in the build process. I suspect that using an updated version of lmdb resolved the memory leak. Note: This only updates the bionic docker-compose files, since we are only supporting bionic. Signed-off-by: Chris Eckhardt <[email protected]>
1 parent 2989a1c commit 294ad9f

File tree

3 files changed

+56
-19
lines changed

3 files changed

+56
-19
lines changed

cli/stdeb.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
[DEFAULT]
2-
Depends3: python3-sawtooth-sdk

validator/Dockerfile-installed-bionic

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,27 @@ RUN echo "deb http://repo.sawtooth.me/ubuntu/nightly bionic universe" >> /etc/ap
3131
libssl-dev \
3232
openssl \
3333
pkg-config \
34+
protobuf-compiler \
3435
python3 \
35-
python3-cachetools \
3636
python3-dev \
37-
python3-grpcio \
38-
python3-grpcio-tools \
39-
python3-protobuf \
40-
python3-pyformance \
41-
python3-sawtooth-sdk \
42-
python3-secp256k1 \
37+
python3-pip \
38+
python3-cachetools \
4339
python3-stdeb \
44-
python3-toml \
4540
unzip
4641

42+
RUN python3 -m pip install pip --upgrade
43+
44+
RUN python3 -m pip install --ignore-installed setuptools protobuf==3.6.1 lmdb colorlog toml
45+
46+
RUN python3 -m pip install --ignore-installed \
47+
secp256k1
48+
49+
RUN python3 -m pip install --ignore-installed \
50+
grpcio==1.15.0 \
51+
grpcio-tools==1.15.0
52+
53+
RUN python3 -m pip install --ignore-installed sawtooth-sdk pyformance==0.4
54+
4755
RUN curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \
4856
&& unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \
4957
&& rm protoc-3.5.1-linux-x86_64.zip
@@ -90,13 +98,22 @@ RUN echo "deb http://repo.sawtooth.me/ubuntu/nightly bionic universe" >> /etc/ap
9098
&& apt-get update \
9199
&& apt-get install -y -q \
92100
git \
93-
python3 \
94-
python3-protobuf \
95-
python3-stdeb \
96-
python3-toml \
97-
python3-grpcio-tools \
98-
python3-grpcio \
99-
python3-sawtooth-sdk
101+
pkg-config \
102+
python3.6 \
103+
python3.6-dev \
104+
python3-pip \
105+
python3-stdeb
106+
107+
RUN python3 -m pip install pip --upgrade
108+
109+
RUN python3 -m pip install --ignore-installed \
110+
setuptools==50.1.0 \
111+
protobuf==3.6.1 \
112+
grpcio==1.15.0 \
113+
grpcio-tools==1.15.0 \
114+
toml
115+
116+
RUN python3 -m pip install --ignore-installed sawtooth-sdk
100117

101118
COPY . /project
102119

@@ -113,8 +130,30 @@ FROM ubuntu:bionic
113130

114131
RUN apt-get update \
115132
&& apt-get install -y \
116-
gnupg \
117-
systemd
133+
pkg-config \
134+
python3.6 \
135+
python3.6-dev \
136+
python3-pip \
137+
gnupg \
138+
systemd
139+
RUN python3 -m pip install pip --upgrade
140+
141+
RUN python3 -m pip install --ignore-installed setuptools protobuf==3.6.1 lmdb colorlog toml
142+
143+
RUN python3 -m pip install --ignore-installed \
144+
secp256k1
145+
146+
RUN python3 -m pip install --ignore-installed \
147+
grpcio==1.15.0 \
148+
grpcio-tools==1.15.0
149+
150+
RUN python3 -m pip install --ignore-installed \
151+
netifaces \
152+
cbor \
153+
cachetools \
154+
requests
155+
156+
RUN python3 -m pip install --ignore-installed sawtooth-sdk pyformance==0.4
118157

119158
COPY --from=sawtooth-cli-builder /project/python3-sawtooth-cli*.deb /tmp
120159

validator/stdeb.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
[DEFAULT]
2-
Depends3: libpython3-dev, openssl, libssl-dev, python3-cachetools

0 commit comments

Comments
 (0)