Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wheel naming in Docker builds for setuptools 75.8.1 compatibility #1075

Merged
merged 4 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### Improvements

* Fix wheel naming in Docker builds for `setuptools v75.8.1` compatibility.
[(#1075)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1075)

* Use native C++ kernels for controlled-adjoint and adjoint-controlled of supported operations.
[(#1063)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1063)

Expand Down Expand Up @@ -89,6 +92,7 @@ Christina Lee,
Joseph Lee,
Luis Alfredo Nuñez Meneses,
Andrija Paurevic,
Alex Preciado,
Shuli Shu

---
Expand Down
16 changes: 8 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN rm -rf tmp && git clone --depth 1 --branch ${LIGHTNING_VERSION} https://github.com/PennyLaneAI/pennylane-lightning.git tmp\
&& mv tmp/* /opt/pennylane-lightning && rm -rf tmp
RUN pip install --no-cache-dir build cmake ninja pybind11 toml wheel
RUN pip install --no-cache-dir build cmake ninja pybind11 toml wheel setuptools>=75.8.1

# Download Lightning release and build lightning-qubit backend
FROM base-build-python AS build-wheel-lightning-qubit
Expand All @@ -85,7 +85,7 @@
# Install lightning-qubit backend
FROM base-runtime AS wheel-lightning-qubit
COPY --from=build-wheel-lightning-qubit /opt/pennylane-lightning/dist/ /
RUN pip install --force-reinstall --no-cache-dir PennyLane_Lightning*.whl && rm PennyLane_Lightning*.whl
RUN pip install --force-reinstall --no-cache-dir pennylane_lightning*.whl && rm pennylane_lightning*.whl
RUN pip install --no-cache-dir git+https://github.com/PennyLaneAI/pennylane.git@${PENNYLANE_VERSION}

# Download Lightning release and build lightning-kokkos backend with Kokkos-OpenMP
Expand All @@ -100,17 +100,17 @@
FROM base-runtime AS wheel-lightning-kokkos-openmp
COPY --from=build-wheel-lightning-kokkos-openmp /opt/pennylane-lightning/dist/ /
COPY --from=build-wheel-lightning-qubit /opt/pennylane-lightning/dist/ /
RUN pip install --force-reinstall --no-cache-dir PennyLane_Lightning*.whl && rm PennyLane_Lightning*.whl
RUN pip install --force-reinstall --no-cache-dir pennylane_lightning*.whl && rm pennylane_lightning*.whl
RUN pip install --no-cache-dir git+https://github.com/PennyLaneAI/pennylane.git@${PENNYLANE_VERSION}

# Install CUDA-12 in build venv image
FROM base-build-python as base-build-cuda
FROM base-build-python AS base-build-cuda
WORKDIR /opt/cuda-build
RUN curl -o cuda-install.run ${CUDA_INSTALLER}
RUN chmod a+x cuda-install.run
RUN ./cuda-install.run --silent --toolkit --toolkitpath=/usr/local/cuda-$(echo ${CUDA_INSTALLER} | grep -o -P '/cuda/.{0,4}' | cut -d / -f 3)
ENV PATH=/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}

Check warning on line 113 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / Docker stable - Linux::x86_64 / docker::ubuntu-latest::lightning-gpu::v0.40.0

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 113 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / Docker stable - Linux::x86_64 / docker::ubuntu-latest::lightning-kokkos-cuda::v0.40.0

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 113 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / Docker latest - Linux::x86_64 / docker::ubuntu-latest::lightning-gpu::master

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 113 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / Docker latest - Linux::x86_64 / docker::ubuntu-latest::lightning-kokkos-cuda::master

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# Download Lightning release and build lightning-kokkos backend with Kokkos-CUDA
FROM base-build-cuda AS build-wheel-lightning-kokkos-cuda
Expand Down Expand Up @@ -139,7 +139,7 @@
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY --from=build-wheel-lightning-kokkos-cuda /opt/pennylane-lightning/dist/ /
COPY --from=build-wheel-lightning-qubit /opt/pennylane-lightning/dist/ /
RUN pip install --force-reinstall --no-cache-dir PennyLane_Lightning*.whl && rm PennyLane_Lightning*.whl
RUN pip install --force-reinstall --no-cache-dir pennylane_lightning*.whl && rm pennylane_lightning*.whl
RUN pip install --no-cache-dir git+https://github.com/PennyLaneAI/pennylane.git@${PENNYLANE_VERSION}

# Download and build Lightning-GPU release
Expand Down Expand Up @@ -172,11 +172,11 @@
ENV LD_LIBRARY_PATH="$VIRTUAL_ENV/lib/python3.10/site-packages/cuquantum/lib:$LD_LIBRARY_PATH"
COPY --from=build-wheel-lightning-gpu /opt/pennylane-lightning/dist/ /
COPY --from=build-wheel-lightning-qubit /opt/pennylane-lightning/dist/ /
RUN pip install --no-cache-dir --force-reinstall PennyLane_Lightning*.whl && rm PennyLane_Lightning*.whl
RUN pip install --no-cache-dir --force-reinstall pennylane_lightning*.whl && rm pennylane_lightning*.whl
RUN pip install --no-cache-dir git+https://github.com/PennyLaneAI/pennylane.git@${PENNYLANE_VERSION}

# Install ROCm in build venv image
FROM base-build-python as base-build-rocm
FROM base-build-python AS base-build-rocm
RUN wget --progress=dot:giga ${ROCM_INSTALLER}
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
Expand All @@ -189,7 +189,7 @@
# Download Lightning release and build lightning-kokkos backend with Kokkos-ROCm
FROM base-build-rocm AS build-wheel-lightning-kokkos-rocm
WORKDIR /opt/pennylane-lightning
ENV CMAKE_PREFIX_PATH=/opt/rocm:$CMAKE_PREFIX_PATH

Check warning on line 192 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / Docker stable - Linux::x86_64 / docker::ubuntu-latest::lightning-kokkos-rocm::v0.40.0

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CMAKE_PREFIX_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 192 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / Docker latest - Linux::x86_64 / docker::ubuntu-latest::lightning-kokkos-rocm::master

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CMAKE_PREFIX_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ENV CXX=hipcc
ENV PL_BACKEND=lightning_kokkos
RUN pip uninstall -y pennylane-lightning
Expand All @@ -213,5 +213,5 @@
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY --from=build-wheel-lightning-kokkos-rocm /opt/pennylane-lightning/dist/ /
COPY --from=build-wheel-lightning-qubit /opt/pennylane-lightning/dist/ /
RUN pip install --force-reinstall --no-cache-dir PennyLane_Lightning*.whl && rm PennyLane_Lightning*.whl
RUN pip install --force-reinstall --no-cache-dir pennylane_lightning*.whl && rm pennylane_lightning*.whl
RUN pip install --no-cache-dir git+https://github.com/PennyLaneAI/pennylane.git@${PENNYLANE_VERSION}
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.41.0-dev25"
__version__ = "0.41.0-dev26"
Loading