diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..a66f82ca0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +.coveragerc +.git +.gitlab-ci.yml +.gitignore +.github +docs +ACKNOWLEDGEMENTS.md +CHANGELOG.md +CONTRIBUTING.md +Makefile +MANIFEST.in +NOTICE.md +readthedocs.yml +tox.ini diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2da3b853..f734a1497 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,3 +54,15 @@ docs: - apt-get update && apt-get install -y pandoc - pandoc --from=markdown --to=rst --output=docs/source/changes.rst CHANGELOG.md - tox -e docs + +test-docker: + stage: test + image: docker:stable + tags: + - dockerd + - github + only: + refs: + - /^v(\d+\.)?(\d+\.)?(\d+)$/ + script: + - docker run --rm $IMAGE:edge python -c "from pyquil import get_qc; qvm = get_qc('9q-qvm')" diff --git a/CHANGELOG.md b/CHANGELOG.md index 877aa4e91..6b4650937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Changelog to quickly get started with compiling and simulating quantum programs! When running the image, a user will be dropped into an `ipython` REPL that has pyQuil and its requirements preinstalled, along with quilc and qvm servers - running in the background (@karalekas, gh-1035). + running in the background (@karalekas, gh-1035, gh-1039). ### Improvements and Changes diff --git a/Dockerfile b/Dockerfile index 5fa4acbde..7175f7475 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # specify the dependency versions (can be overriden with --build-arg) -ARG quilc_version=1.12.0 +ARG quilc_version=1.12.1 ARG qvm_version=1.12.0 ARG python_version=3.6 @@ -8,15 +8,15 @@ FROM rigetti/quilc:$quilc_version as quilc FROM rigetti/qvm:$qvm_version as qvm FROM python:$python_version -# copy over the pre-built quilc binary from the first build stage -COPY --from=quilc /src/quilc /src/quilc +# copy over the pre-built quilc binary and tweedledum library from the first build stage +COPY --from=quilc /usr/local/lib/libtweedledum.so /usr/local/lib/libtweedledum.so +COPY --from=quilc /src/quilc/quilc /src/quilc/quilc # copy over the pre-built qvm binary from the second build stage -COPY --from=qvm /src/qvm /src/qvm +COPY --from=qvm /src/qvm/qvm /src/qvm/qvm -# install the missing apt requirements that can't be copied over -RUN echo "deb http://http.us.debian.org/debian/ testing non-free contrib main" >> /etc/apt/sources.list && \ - apt-get update && apt-get -yq dist-upgrade && \ +# install the missing apt that aren't copied over +RUN apt-get update && apt-get -yq dist-upgrade && \ apt-get install --no-install-recommends -yq \ clang-7 git libblas-dev libffi-dev liblapack-dev libzmq3-dev && \ rm -rf /var/lib/apt/lists/*