From 9ddfe85b65f39bf573f548fd7d98a28c6af39b06 Mon Sep 17 00:00:00 2001 From: Johnnie Birch Date: Sun, 19 Nov 2023 13:00:55 -0800 Subject: [PATCH 1/2] Update wasmtime, ubuntu, and rust versions --- Dockerfile | 26 ++----- requirements.txt | 176 ++++++++++++++++++++++++++++++++--------------- wasmscore.sh | 2 +- 3 files changed, 126 insertions(+), 78 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b5748a..96e5840 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG ARCH ENV LD_LIBRARY_PATH=/usr/local/lib ENV PATH=/usr/local/bin:$PATH CMD ["/bin/bash"] ENV DEBIAN_FRONTEND="noninteractive" TZ="America" -ARG RUST_VERSION="nightly-2023-04-01" +ARG RUST_VERSION="nightly-2023-11-19" ARG WASMTIME_REPO="https://github.com/bytecodealliance/wasmtime/" -ARG WASMTIME_COMMIT="1bfe4b5" # v9.0.1 +ARG WASMTIME_COMMIT="5fc1252" # v14.0.4 ARG SIGHTGLASS_REPO="https://github.com/bytecodealliance/sightglass.git" ARG SIGHTGLASS_BRANCH="main" ARG SIGHTGLASS_COMMIT="e89fce0" @@ -19,24 +19,6 @@ RUN apt-get update \ psmisc lsof git nano zlib1g-dev libedit-dev time yasm \ libssl-dev pkg-config -# Bionic does not carry a recent enough cmake needed for wamr but upgrading -# to Focal causes other build issues so the straight forward solution is to just -# install a version of cmake that is recent enough from a separate repository -RUN wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - -RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' -RUN apt-get update && apt-get install --yes cmake - -# Install wabt -WORKDIR /opt -RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git \ - && cd wabt \ - && mkdir build \ - && cd build \ - && cmake .. \ - && cmake --build . \ - && make -ENV PATH=$PATH:/opt/wabt/bin/ - # Install rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${RUST_VERSION} -y ENV PATH=/root/.cargo/bin:${PATH} @@ -45,7 +27,7 @@ ENV PATH=/root/.cargo/bin:${PATH} RUN apt-get install -y --no-install-recommends clang # Install python -RUN apt-get install -y --no-install-recommends python3.8 libpython3.8 python3-distutils python3-pip +RUN apt-get install -y --no-install-recommends python3.10 libpython3.10 python3-distutils python3-pip RUN python3 -m pip install termgraph \ && python3 -m pip install pandas \ && python3 -m pip install termcolor \ diff --git a/requirements.txt b/requirements.txt index e40553f..1cf821a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,63 +1,129 @@ -attrs==19.3.0 -Automat==0.8.0 +ansible==8.5.0 +ansible-core==2.15.5 +apturl==0.5.2 +astroid==2.15.1 +attrs==21.2.0 +autopep8==2.0.2 +Babel==2.8.0 +bcrypt==3.2.0 +black==23.3.0 blinker==1.4 -certifi==2019.11.28 -chardet==3.0.4 -Click==7.0 -cloud-init==20.1 -colorama==0.4.3 +Brlapi==0.8.3 +certifi==2020.6.20 +chardet==4.0.0 +click==8.0.3 +colorama==0.4.4 command-not-found==0.3 -configobj==5.0.6 -constantly==15.1.0 -cryptography==2.8 -dbus-python==1.2.16 -distro==1.4.0 -distro-info===0.23ubuntu1 -entrypoints==0.3 -httplib2==0.14.0 -hyperlink==19.0.0 -idna==2.8 -importlib-metadata==1.5.0 -incremental==16.10.1 -Jinja2==2.10.1 -jsonpatch==1.22 -jsonpointer==2.0 +cryptography==3.4.8 +cupshelpers==1.0 +dbus-python==1.2.18 +defer==1.0.6 +devscripts===2.22.1ubuntu1 +dill==0.3.6 +distlib==0.3.4 +distro==1.7.0 +distro-info==1.1+ubuntu0.1 +dnspython==2.1.0 +docker==5.0.3 +docker-compose==1.29.2 +dockerpty==0.4.1 +docopt==0.6.2 +duplicity==0.8.21 +fasteners==0.14.1 +filelock==3.6.0 +flake8==4.0.1 +future==0.18.2 +gpg==1.16.0 +HelperSDT==0.1.0 +httplib2==0.20.2 +idna==3.3 +importlib-metadata==4.6.4 +isort==5.12.0 +jeepney==0.7.1 +Jinja2==3.0.3 +jmespath==0.10.0 jsonschema==3.2.0 -keyring==18.0.1 +keyring==23.5.0 language-selector==0.1 -launchpadlib==1.10.13 -lazr.restfulclient==0.14.2 -lazr.uri==1.0.3 -MarkupSafe==1.1.0 -more-itertools==4.2.0 -netifaces==0.10.4 -oauthlib==3.1.0 -pyasn1==0.4.2 -pyasn1-modules==0.2.1 -PyGObject==3.36.0 -PyHamcrest==1.9.0 -PyJWT==1.7.1 +launchpadlib==1.10.16 +lazr.restfulclient==0.14.4 +lazr.uri==1.0.6 +lazy-object-proxy==1.9.0 +lockfile==0.12.2 +louis==3.20.0 +macaroonbakery==1.3.1 +Mako==1.1.3 +Markdown==3.3.6 +MarkupSafe==2.0.1 +mccabe==0.6.1 +meld==3.20.4 +monotonic==1.6 +more-itertools==8.10.0 +mypy-extensions==1.0.0 +netifaces==0.11.0 +ntlm-auth==1.4.0 +numpy==1.22.4 +oauthlib==3.2.0 +olefile==0.46 +packaging==23.0 +pandas==1.4.2 +paramiko==2.9.3 +pathspec==0.11.1 +pexpect==4.8.0 +Pillow==9.0.1 +platformdirs==2.5.1 +protobuf==3.12.4 +ptyprocess==0.7.0 +pycairo==1.20.1 +pycodestyle==2.11.0 +pycups==2.0.1 +pyflakes==2.4.0 +Pygments==2.11.2 +PyGObject==3.42.1 +PyJWT==2.3.0 +pykerberos==1.1.14 +pylint==2.17.1 pymacaroons==0.13.0 -PyNaCl==1.3.0 -pyOpenSSL==19.0.0 -pyrsistent==0.15.5 -pyserial==3.4 -python-apt==2.0.0 -python-debian===0.1.49 -PyYAML==5.3.1 -requests==2.22.0 -requests-unixsocket==0.2.0 -SecretStorage==2.3.1 -service-identity==18.1.0 -simplejson==3.16.0 -six==1.14.0 -ssh-import-id==5.10 +PyNaCl==1.5.0 +pyparsing==2.4.7 +pyRFC3339==1.1 +pyrsistent==0.18.1 +python-apt==2.4.0+ubuntu2 +python-dateutil==2.8.1 +python-debian==0.1.43+ubuntu1.1 +python-dotenv==0.19.2 +python-magic==0.4.24 +pytz==2022.1 +pywinrm==0.3.0 +pyxdg==0.27 +PyYAML==5.4.1 +reportlab==3.6.8 +requests==2.25.1 +requests-kerberos==0.12.0 +requests-ntlm==1.1.0 +requests-toolbelt==0.9.1 +resolvelib==0.8.1 +scour==0.38.2 +SecretStorage==3.3.1 +six==1.16.0 +ssh-import-id==5.11 systemd-python==234 -Twisted==18.9.0 -ubuntu-advantage-tools==20.3 -ufw==0.36 +texttable==1.6.4 +tomli==2.0.1 +tomlkit==0.11.7 +typing_extensions==4.5.0 +ubuntu-advantage-tools==8001 +ubuntu-drivers-common==0.0.0 +ufw==0.36.1 unattended-upgrades==0.1 -urllib3==1.25.8 -wadllib==1.3.3 +unidiff==0.5.5 +urllib3==1.26.5 +usb-creator==0.3.7 +virtualenv==20.13.0+ds +wadllib==1.3.6 +websocket-client==1.2.3 +wrapt==1.15.0 +xdg==5 +xkit==0.0.0 +xmltodict==0.12.0 zipp==1.0.0 -zope.interface==4.7.1 diff --git a/wasmscore.sh b/wasmscore.sh index ee706cd..137ffd3 100755 --- a/wasmscore.sh +++ b/wasmscore.sh @@ -1,4 +1,4 @@ #!/bin/bash cd sightglass -python3.8 ./wasmscore.py $@ +python3.10 ./wasmscore.py $@ cd - > /dev/null \ No newline at end of file From 10e0986b0fbaf6b8297acccb3f363553a3cd0451 Mon Sep 17 00:00:00 2001 From: Johnnie Birch Date: Sun, 19 Nov 2023 13:59:24 -0800 Subject: [PATCH 2/2] Simplify build.sh run instructions. --- Dockerfile | 2 +- build.sh | 15 ++------------- wasmscore.sh | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 96e5840..440c224 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ ENV PATH=/root/.cargo/bin:${PATH} RUN apt-get install -y --no-install-recommends clang # Install python -RUN apt-get install -y --no-install-recommends python3.10 libpython3.10 python3-distutils python3-pip +RUN apt-get install -y --no-install-recommends python3.8 libpython3.8 python3-distutils python3-pip RUN python3 -m pip install termgraph \ && python3 -m pip install pandas \ && python3 -m pip install termcolor \ diff --git a/build.sh b/build.sh index d92da50..819eaef 100755 --- a/build.sh +++ b/build.sh @@ -12,19 +12,8 @@ docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}_${KERNEL}:latest docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}_${KERNEL}:${IMAGE_VER} echo "" -echo "The entry point is a wrapper to the python script 'wasmscore.py'" +echo "The entry point is a wrapper to the python script 'wasmscore.py'." +echo "" echo "To run from this local build use command (for a list of more options use --help):" echo "> docker run -ti ${IMAGE_NAME} " echo "" -echo "To stop and rm all ${IMAGE_NAME} containers:" -echo "> docker rm \$(docker stop \$(docker ps -a -q --filter ancestor=${IMAGE_NAME}:latest --format="{{.ID}}"))" -echo "" -echo "For a detached setup that allows for copying files to the image or" -echo "entering the container, use the following commands:" -echo "> docker run --entrypoint=/bin/bash -ti -d ${IMAGE_NAME}" -echo "> wasmscore_container_id=\$(docker ps | grep -m 1 ${IMAGE_NAME} | awk '{ print \$1 }')" -echo "" -echo "> docker cp \${wasmscore_container_id}:" -echo "or" -echo "> docker exec -ti \${wasmscore_container_id}" /bin/bash -echo "" diff --git a/wasmscore.sh b/wasmscore.sh index 137ffd3..83846fa 100755 --- a/wasmscore.sh +++ b/wasmscore.sh @@ -1,4 +1,4 @@ #!/bin/bash cd sightglass -python3.10 ./wasmscore.py $@ +python3 ./wasmscore.py $@ cd - > /dev/null \ No newline at end of file