Skip to content

Commit c15fa0d

Browse files
authored
Create a PennyLane-lightning requirements-dev.txt and update the Dockerfile (#330)
* Create a requirements-dev.txt * Update tests and benchmarks * Improve dockerfile
1 parent 87538ec commit c15fa0d

File tree

8 files changed

+22
-18
lines changed

8 files changed

+22
-18
lines changed

.github/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
### Improvements
88

9+
* Introduces requirements-dev.txt and improves dockerfile.
10+
[(#330)](https://github.com/PennyLaneAI/pennylane-lightning/pull/330)
11+
912
### Documentation
1013

1114
### Bug fixes
@@ -14,6 +17,8 @@
1417

1518
This release contains contributions from (in alphabetical order):
1619

20+
Amintor Dusko
21+
1722
---
1823

1924
# Release 0.25.0

.github/workflows/benchmarks.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ jobs:
3232
run: |
3333
cd main
3434
python -m pip install --upgrade pip
35-
pip install -r requirements.txt
35+
pip install -r requirements-dev.txt
3636
pip install matplotlib
37-
pip install git+https://github.com/PennyLaneAI/pennylane.git@master
3837
3938
- name: Install lightning.qubit device (master)
4039
run: |

.github/workflows/tests_linux.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,7 @@ jobs:
230230
run: |
231231
cd main
232232
python -m pip install --upgrade pip
233-
pip install -r requirements.txt
234-
pip uninstall pennylane -y
235-
pip install git+https://github.com/PennyLaneAI/pennylane.git
233+
pip install -r requirements-dev.txt
236234
237235
- name: Install ML libraries for interfaces
238236
run: |
@@ -285,9 +283,7 @@ jobs:
285283
run: |
286284
cd main
287285
python -m pip install --upgrade pip
288-
pip install -r requirements.txt
289-
pip uninstall pennylane -y
290-
pip install git+https://github.com/PennyLaneAI/pennylane.git
286+
pip install -r requirements-dev.txt
291287
292288
- name: Install ML libraries for interfaces
293289
run: |

.github/workflows/tests_without_binary.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ jobs:
3636
run: |
3737
cd main
3838
python -m pip install --upgrade pip
39-
pip install -r requirements.txt
40-
pip uninstall pennylane -y
41-
pip install git+https://github.com/PennyLaneAI/pennylane.git
39+
pip install -r requirements-dev.txt
4240
4341
- name: Install lightning.qubit device
4442
run: |

docker/Dockerfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ RUN apt-get update \
2929
python3-pip \
3030
python3-venv \
3131
python3-dev \
32+
gcc-10 g++-10 cpp-10 \
3233
&& apt-get clean \
3334
&& rm -rf /var/lib/apt/lists/* \
35+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
3436
&& /usr/sbin/update-ccache-symlinks \
3537
&& mkdir /opt/ccache \
3638
&& ccache --set-config=cache_dir=/opt/ccache \
@@ -44,12 +46,8 @@ WORKDIR /opt/pennylane-lightning
4446
COPY . .
4547

4648
RUN pip install --no-cache-dir wheel \
47-
pytest \
48-
pytest-cov \
49-
pytest-mock \
50-
flaky \
5149
sphinx \
52-
&& pip install --no-cache-dir -r requirements.txt \
50+
&& pip install --no-cache-dir -r requirements-dev.txt \
5351
&& pip uninstall -y PennyLane_Lightning \
5452
&& make install \
5553
&& make test-python \

pennylane_lightning/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
Version number (major.minor.patch[-label])
1717
"""
1818

19-
__version__ = "0.26.0-dev"
19+
__version__ = "0.26.0-dev1"

requirements-dev.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ninja
2+
flaky
3+
numpy
4+
git+https://github.com/PennyLaneAI/pennylane.git@master
5+
pybind11
6+
pytest
7+
pytest-cov
8+
pytest-mock

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ninja
22
flaky
33
numpy
4-
pennylane>=0.15
4+
pennylane~=0.25
55
pybind11
66
pytest
77
pytest-cov

0 commit comments

Comments
 (0)