-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: Add binder image to run tutorials
- Loading branch information
1 parent
a1c1318
commit bd7c5e3
Showing
7 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM rigetti/forest:3.0.0 | ||
|
||
# install jupyter notebook and jupyter lab | ||
COPY binder-requirements.txt binder-requirements.txt | ||
RUN pip install --no-cache-dir -r binder-requirements.txt | ||
|
||
# create user with UID 1000 and associated home dir (required by binder) | ||
ARG NB_USER=binder | ||
ARG NB_UID=1000 | ||
ENV USER ${NB_USER} | ||
ENV NB_UID ${NB_UID} | ||
ENV HOME /home/${NB_USER} | ||
RUN adduser --disabled-password \ | ||
--gecos "Default user" \ | ||
--uid ${NB_UID} \ | ||
${NB_USER} | ||
|
||
WORKDIR ${HOME} | ||
|
||
# copy tutorials | ||
COPY docs/examples/ examples/ | ||
|
||
# install qelib1.inc | ||
ARG qelib1_version=0.16.2 | ||
RUN curl -L -o ${HOME}/qelib1_LICENSE.txt https://raw.githubusercontent.com/Qiskit/qiskit-terra/$qelib1_version/LICENSE.txt | ||
RUN curl -L -o ${HOME}/qelib1.inc https://raw.githubusercontent.com/Qiskit/qiskit-terra/$qelib1_version/qiskit/qasm/libs/qelib1.inc | ||
|
||
# transfer ownership of /home/binder to binder user | ||
USER root | ||
RUN chown -R ${NB_UID} ${HOME} | ||
USER ${NB_USER} | ||
|
||
# signal that we need to publish port 8888 to run the notebook server | ||
EXPOSE 8888 | ||
|
||
# run the notebook server | ||
CMD ["jupyter", "lab", "--ip=0.0.0.0"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
qiskit-rigetti==0.4.* | ||
qiskit[visualization] | ||
notebook | ||
jupyterlab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters