forked from rigetti/pyquil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# specify the dependency versions (can be overriden with --build_arg)
ARG quilc_version=1.20.0
ARG qvm_version=1.17.1
ARG python_version=3.6
# use multi-stage builds to independently pull dependency versions
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/quilc /src/quilc/quilc
# copy over the pre-built qvm binary from the second build stage
COPY --from=qvm /src/qvm/qvm /src/qvm/qvm
# install the missing apt packages that aren't copied over
RUN apt-get update && apt-get -yq dist-upgrade && \
apt-get install --no-install-recommends -yq \
git libblas-dev libffi-dev liblapack-dev libzmq3-dev && \
rm -rf /var/lib/apt/lists/*
# install ipython
RUN pip install --no-cache-dir ipython
# copy over files and install requirements
ADD . /src/pyquil
WORKDIR /src/pyquil
RUN pip install -e .
# use an entrypoint script to add startup commands (qvm & quilc server spinup)
ENTRYPOINT ["/src/pyquil/entrypoint.sh"]
CMD ["ipython"]