Skip to content

Commit

Permalink
Upgrade to Ubuntu 22.04 & Fix Dockerfile issue with Python version > 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
llaubin authored and cnheitman committed Oct 21, 2024
1 parent 7d12b36 commit afeb3c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 ubuntu:20.04
FROM --platform=linux/amd64 ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive

COPY . /Triton
Expand Down Expand Up @@ -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())" && \
Expand Down

0 comments on commit afeb3c2

Please sign in to comment.