Skip to content

Commit 78ad1a0

Browse files
committed
use system packages for dependencies in full arm64 build
1 parent 62f401f commit 78ad1a0

File tree

2 files changed

+23
-115
lines changed

2 files changed

+23
-115
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ jobs:
6060
if: ${{ github.event.inputs.container == 'all' || github.event.inputs.container == 'full' || github.event.inputs.container == '' }}
6161
uses: docker/build-push-action@v6
6262
with:
63-
#platforms: linux/amd64,linux/arm64
64-
platforms: linux/arm64
63+
platforms: linux/amd64,linux/arm64
6564
context: .
6665
file: ./full/Dockerfile
6766
push: true

full/Dockerfile

Lines changed: 22 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,26 @@
11
FROM oscarlevin/pretext:small
22

3-
ARG TARGETPLATFORM
4-
5-
RUN apt-get update \
6-
&& apt-get install -y --no-install-recommends \
7-
python3-dev \
8-
bzip2 \
9-
gcc \
10-
build-essential \
11-
tox \
12-
libboost-dev \
13-
libboost-regex-dev \
14-
pkg-config \
15-
m4 \
16-
flex \
17-
bison \
18-
bc \
19-
libbz2-dev \
20-
libffi-dev \
21-
libbrial-dev \
22-
libbrial-groebner-dev \
23-
libcdd-dev \
24-
libcdd-tools \
25-
cliquer \
26-
libcliquer-dev \
27-
cmake \
28-
curl \
29-
4ti2 \
30-
libcurl4-openssl-dev \
31-
ecl \
32-
libec-dev \
33-
ninja-build \
34-
patchelf \
35-
libmpfr-dev \
36-
ppl-dev && \
37-
if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
38-
echo "Installing additional dependencies for ARM64 architecture" && \
39-
export SAGE_CONF_TARGETS="fpylll gmpy2 lrcalc_python memory_allocator pplpy primecountpy" && \
40-
export SAGE_NUM_THREADS=1 && \
41-
pip install -v passagemath-conf && \
42-
export PIP_FIND_LINKS="$(sage-config SAGE_SPKG_WHEELS)" && \
43-
export PIP_PREFER_BINARY=1; \
44-
fi && \
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends \
5+
python3-dev \
6+
build-essential \
7+
gcc && \
8+
apt-get install -y --no-install-recommends\
9+
cysignals-tools \
10+
python3-cysignals-pari \
11+
python3-gmpy2 \
12+
lrcalc \
13+
python3-memory-allocator \
14+
python3-ppl \
15+
ppl-dev \
16+
python3-primecountpy && \
4517
pip install --prefer-binary passagemath-standard --no-cache-dir && \
18+
# clean up
4619
apt-get remove -y \
47-
python3-dev \
48-
bzip2 \
49-
gcc \
50-
build-essential \
51-
tox \
52-
libboost-dev \
53-
libboost-regex-dev \
54-
pkg-config \
55-
m4 \
56-
flex \
57-
bison \
58-
bc \
59-
libbz2-dev \
60-
libffi-dev \
61-
libbrial-dev \
62-
libbrial-groebner-dev \
63-
libcdd-dev \
64-
libcdd-tools \
65-
cliquer \
66-
libcliquer-dev \
67-
cmake \
68-
curl \
69-
4ti2 \
70-
libcurl4-openssl-dev \
71-
ecl \
72-
libec-dev \
73-
ninja-build \
74-
patchelf \
75-
libmpfr-dev \
76-
python3-trove-classifiers \
77-
python3-fpylll \
78-
libmpc-dev \
79-
python3-typing-extensions \
80-
libfplll-dev \
81-
gfortran \
82-
libzmq3-dev \
83-
libopenblas-dev \
84-
python3-tomli \
85-
flit \
86-
python3-flit-scm \
87-
ppl-dev \
88-
cython3 \
89-
fplll-tools && \
90-
apt-get autoremove -y && apt-get clean && \
91-
rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/*
92-
93-
#apt-get update && apt-get install -y --no-install-recommends \
94-
# binutils \
95-
# make \
96-
# m4 \
97-
# flex \
98-
# bison \
99-
# perl \
100-
# python3 \
101-
# python3-dev \
102-
# bc \
103-
# gcc \
104-
# g++ \
105-
# ca-certificates \
106-
# libbz2-dev \
107-
# bzip2 \
108-
# xz-utils \
109-
# libffi-dev \
110-
#&& export SAGE_CONF_TARGETS="fpylll gmpy2 lrcalc_python memory_allocator pplpy primecountpy" \
111-
#&& pip install --force-reinstall -v --prefer-binary passagemath-conf \
112-
#&& export PIP_FIND_LINKS="$(sage-config SAGE_SPKG_WHEELS)" \
113-
#&& export PIP_PREFER_BINARY=1 \
114-
115-
#\
116-
#&& apt-get purge --auto-remove -y binutils make m4 flex bison gcc g++ libbz2-dev libffi-dev python3-dev \
117-
#&& apt-get clean && rm -rf /var/lib/apt/lists/*
20+
python3-dev \
21+
build-essential \
22+
gcc && \
23+
apt-get autoremove -y && \
24+
apt-get clean && \
25+
rm -rf /var/lib/apt/lists/* && \
26+
rm -rf /tmp/* /var/tmp/*

0 commit comments

Comments
 (0)