From a17a80a00ef6549b5dc117a7ba51ec08fde191ea Mon Sep 17 00:00:00 2001 From: Yutaro Iiyama Date: Tue, 20 Jun 2023 10:18:00 +0900 Subject: [PATCH] updated packages --- .binder/postBuild | 8 +++++--- .binder/requirements.txt | 1 + .github/workflows/publish.yml | 2 +- build-runner/Dockerfile.buildenv | 2 +- build-runner/Dockerfile.packages | 13 +++++++++---- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.binder/postBuild b/.binder/postBuild index bdd916dc..9906a0b1 100644 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -2,6 +2,8 @@ ROOTDIR=$(git rev-parse --show-toplevel 2>/dev/null) -git clone https://github.com/derlin/hepqpr-qallse -cp -r hepqpr-qallse/src/hepqpr $ROOTDIR/source -ln -s $ROOTDIR/source/hepqpr $ROOTDIR/source/ja/hepqpr +# Binder runtime environment is primarily derived from requirements.txt in this directory; anything that can't be pip-installed must be processed here + +git clone https://github.com/LAL/trackml-library.git +pip3 install ./trackml-library +rm -rf trackml-library diff --git a/.binder/requirements.txt b/.binder/requirements.txt index bfa69694..3c198739 100644 --- a/.binder/requirements.txt +++ b/.binder/requirements.txt @@ -11,3 +11,4 @@ plotly pandas scikit-learn tabulate +dwave-qbsolv diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ad557a9d..118cabda 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ jobs: - name: Build the books run: | - docker run --rm --mount type=bind,src=$GITHUB_WORKSPACE,dst=/qc-workbook yiiyama/jupyterbook-qiskit:1.1.1 /qc-workbook/build-runner/build_and_publish.py --account $GITHUB_REPOSITORY_OWNER --keep-reports + docker run --rm --mount type=bind,src=$GITHUB_WORKSPACE,dst=/qc-workbook yiiyama/jupyterbook-qiskit:1.1.2 /qc-workbook/build-runner/build_and_publish.py --account $GITHUB_REPOSITORY_OWNER --keep-reports - name: GitHub Pages action uses: peaceiris/actions-gh-pages@v3.7.3 diff --git a/build-runner/Dockerfile.buildenv b/build-runner/Dockerfile.buildenv index 50381836..723ea41a 100644 --- a/build-runner/Dockerfile.buildenv +++ b/build-runner/Dockerfile.buildenv @@ -1,4 +1,4 @@ -FROM yiiyama/jupyterbook-qiskit-packages:1.1.1 AS packages_cleaned +FROM yiiyama/jupyterbook-qiskit-packages:1.1.2 AS packages_cleaned COPY clean_packages.sh / RUN /clean_packages.sh diff --git a/build-runner/Dockerfile.packages b/build-runner/Dockerfile.packages index 5f86d303..a9636382 100644 --- a/build-runner/Dockerfile.packages +++ b/build-runner/Dockerfile.packages @@ -1,10 +1,7 @@ FROM ubuntu:latest RUN apt-get -y update && \ - apt-get install -y \ - python3 \ - python3-venv \ - python3-pip + apt-get install -y python3 python3-venv python3-pip git # First line: jupyter-book installs a bunch of dependencies and some have # superficially conflicting version requirements. Conflict occurs because @@ -18,4 +15,12 @@ RUN pip3 install --no-cache-dir mdit-py-plugins==0.3.5 docutils==0.17.1 pydata-s pip3 install --no-cache-dir scikit-learn==1.2.2 && \ pip3 install --no-cache-dir jupyter-book==0.15.1 tabulate==0.9.0 +# The next two blocks are libraries required at runtime (not build time) only, so they are not needed in principle +# (Cells using these libraries are tagged as "throws-exception") +RUN pip3 install dwave-qbsolv + +RUN git clone https://github.com/LAL/trackml-library.git && \ + pip3 install ./trackml-library && \ + rm -rf trackml-library + # Tag as yiiyama/jupyterbook-qiskit-packages:__version__