Skip to content

Commit

Permalink
Try fixing codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr committed Sep 12, 2023
1 parent 21e287b commit 5dce308
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
# Setup and build pennylane-lightning


FROM ubuntu:jammy AS base
FROM ubuntu:jammy AS base-runtime
ARG KOKKOS_VERSION=4.1.00
ARG LIGHTNING_VERSION=0.32.0
ARG CUDA_VERSION=12.2

FROM base AS base-runtime
RUN apt-get update
RUN apt-get install --no-install-recommends -y \
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
apt-utils \
ca-certificates \
libgomp1 \
Expand All @@ -31,14 +29,15 @@ RUN apt-get install --no-install-recommends -y \
python3-venv \
tzdata \
wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/opt/venv-build
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

FROM base-runtime AS base-build
RUN apt-get update
RUN apt-get install --no-install-recommends -y \
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
ccache \
cmake \
Expand All @@ -47,7 +46,8 @@ RUN apt-get install --no-install-recommends -y \
ninja-build \
python3-dev \
gcc-11 g++-11 cpp-11 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
Expand Down Expand Up @@ -150,13 +150,14 @@ RUN PL_BACKEND=lightning_kokkos python setup.py build_ext
RUN PL_BACKEND=lightning_kokkos python setup.py bdist_wheel

FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 AS wheel-lightning-kokkos-cuda
RUN apt-get update
RUN apt-get install --no-install-recommends -y \
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
libgomp1 \
python3 \
python3-pip \
python3-venv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
Expand All @@ -179,13 +180,14 @@ RUN python setup.py build_ext --cuquantum=$(python -c "import site; print( f'{si
RUN python setup.py bdist_wheel

FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 AS wheel-lightning-gpu
RUN apt-get update
RUN apt-get install --no-install-recommends -y \
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
libgomp1 \
python3 \
python3-pip \
python3-venv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
Expand Down

0 comments on commit 5dce308

Please sign in to comment.