Skip to content

Commit

Permalink
Build python3.7 from source instead
Browse files Browse the repository at this point in the history
Note that this increases the build time to ~20-30 minutes on my PC.
disabling python's optimizations (see dockerfile) will lower this
to ~3-4 minutes, your experience may vary.
  • Loading branch information
8uurg committed Feb 11, 2022
1 parent 08c1d75 commit 1402c56
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions CFD.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@ FROM frehbach/cfd-test-problem-suite

# Install python 3.7
RUN apt-get install -y software-properties-common &&\
add-apt-repository ppa:deadsnakes/ppa &&\
apt-get update &&\
apt-get install -y build-essential python3-pip python3.7 python3.7-dev swig &&\
apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev &&\
wget https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tgz &&\
tar -xf Python-3.7.10.tgz &&\
cd Python-3.7.10 &&\
# With optimizations takes longer to build, but given the time senstive nature of the benchmarks
# it is likely good to enable them.
./configure --enable-optimizations --with-ensurepip=install &&\
# Alternatively, for testing if things work at all:
# ./configure --with-ensurepip=install &&\
make -j 4 &&\
make altinstall &&\
cd .. &&\
# apt-get install -y python3-pip python3.7 python3.7-dev swig &&\
python3.7 -m ensurepip --default-pip &&\
apt-get install -y swig &&\
python3.7 -m pip install --upgrade pip &&\
python3.7 -m pip install --upgrade cython setuptools wheel

Expand Down

0 comments on commit 1402c56

Please sign in to comment.