Skip to content

Commit 84fb42b

Browse files
committed
chore(release) use Python 3.8+ in older distributions
Fixing V8 build issues, see NVIDIA/DeepLearningExamples#1016 Fixes #430
1 parent 9538ad8 commit 84fb42b

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

assets/release/Dockerfiles/Dockerfile.amd64.centos7

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
FROM amd64/centos:7
1+
# Use Python 3.8+ (required by V8's GN build system)
2+
# See https://hub.docker.com/r/centos/python-38-centos7
3+
FROM centos/python-38-centos7
24
COPY . /ngx_wasm_module
5+
USER root
36

4-
RUN yum install -y epel-release && \
5-
yum update -y && \
7+
RUN yum update -y && \
8+
yum install -y epel-release && \
69
yum install -y centos-release-scl && \
710
yum install -y \
811
devtoolset-8 \
@@ -13,16 +16,16 @@ RUN yum install -y epel-release && \
1316
cmake3 \
1417
make \
1518
gcc \
16-
python3 \
1719
git \
1820
glib2-devel \
1921
perl \
2022
perl-IPC-Cmd \
2123
perl-Test-Simple
2224

25+
RUN ln -nfs $(which cmake3) /usr/bin/cmake
26+
2327
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo
2428
ENV PATH $CARGO_HOME/bin:$PATH
25-
RUN ln -nfs $(which cmake3) /usr/bin/cmake
2629
RUN mkdir -p "$CARGO_HOME" && mkdir -p "$RUSTUP_HOME" && \
2730
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable && \
2831
chmod -R a=rwX $CARGO_HOME $RUSTUP_HOME

assets/release/Dockerfiles/Dockerfile.amd64.centos8

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
1313
libstdc++-devel \
1414
libatomic \
1515
perl \
16-
python3 \
16+
python39 \
1717
git \
1818
glib2-devel
1919

assets/release/Dockerfiles/Dockerfile.amd64.ubuntu-18.04

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ FROM amd64/ubuntu:18.04
22
COPY . /ngx_wasm_module
33

44
ARG DEBIAN_FRONTEND=noninteractive
5+
6+
# Install Python 3.8+ (required by V8's GN build system)
7+
RUN apt-get update && \
8+
apt-get install -y software-properties-common && \
9+
add-apt-repository -y ppa:deadsnakes/ppa && \
10+
apt-get update && \
11+
apt-get install -y python3.8 && \
12+
ln -nfs $(which python3.8) /usr/bin/python3
13+
514
RUN apt-get update && \
615
apt-get install -y --no-install-recommends \
716
ca-certificates \
817
build-essential \
918
ninja-build \
10-
python3 \
11-
cmake \
1219
gcc-8 \
1320
libstdc++-8-dev \
1421
git \

0 commit comments

Comments
 (0)