From afeb3c2f23e66163dfdc9e33caa6d84af90bd909 Mon Sep 17 00:00:00 2001 From: llaubin <20232176+llaubin@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:22:50 +0200 Subject: [PATCH] Upgrade to Ubuntu 22.04 & Fix Dockerfile issue with Python version > 3.9 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f5f18809e..0cca510dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive COPY . /Triton @@ -30,11 +30,11 @@ RUN cd /tmp && \ # libz3 >= 4.6.0 RUN pip3 install z3-solver==4.8.14 -RUN PYV=`python3 -c "import platform;print(platform.python_version()[:3])"` && \ +RUN PYV=`python3 -c "import platform;print(f'3.{platform.python_version_tuple()[1]}')"` && \ # Triton (LLVM for lifting; z3 or bitwuzla as SMT solver) cd /Triton && mkdir /tmp/triton-build && cd /tmp/triton-build && cmake -DLLVM_INTERFACE=ON -DCMAKE_PREFIX_PATH=$(/usr/lib/llvm-12/bin/llvm-config --prefix) -DZ3_INTERFACE=ON -DZ3_INCLUDE_DIRS=/usr/local/lib/python$PYV/dist-packages/z3/include/ -DZ3_LIBRARIES=/usr/local/lib/python$PYV/dist-packages/z3/lib/libz3.so -DBITWUZLA_INTERFACE=ON -DBITWUZLA_INCLUDE_DIRS=/usr/local/include -DBITWUZLA_LIBRARIES=/usr/local/lib/x86_64-linux-gnu/libbitwuzla.so /Triton && make -j$(nproc) && make install -RUN PYV=`python3 -c "import platform;print(platform.python_version()[:3])"` && \ +RUN PYV=`python3 -c "import platform;print(f'3.{platform.python_version_tuple()[1]}')"` && \ PYP="/usr/lib/python$PYV/site-packages" && \ echo export PYTHONPATH="$PYP:\$PYTHONPATH" >> /etc/bash.bashrc && \ python3 -c "import z3; print('Z3 version:', z3.get_version_string())" && \