Commit a3a5ed13 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Rebase the Q# integration DockerFile on qcor/deploy-base image



Install .NET Core on top of it...

Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 26e11a98
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-focal
from qcor/deploy-base

# Install .NET
RUN wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
    dpkg -i packages-microsoft-prod.deb && \
    apt-get update && apt-get install -y apt-transport-https && apt-get update && apt-get install -y dotnet-sdk-3.1

# Install Q# SDK
RUN dotnet new -i Microsoft.Quantum.ProjectTemplates

RUN apt-get update && apt-get -y install cmake gcc g++ clang-format libcurl4-openssl-dev libunwind-dev libpython3-dev python3-pip libblas-dev liblapack-dev lsb-release && \
    wget -qO- https://aide-qc.github.io/deploy/aide_qc/debian/PUBLIC-KEY.gpg | apt-key add - && \
    wget -qO- "https://aide-qc.github.io/deploy/aide_qc/debian/$(lsb_release -cs)/aide-qc.list" | tee -a /etc/apt/sources.list.d/aide-qc.list && \
    apt-get update && apt-get -y install aideqc-llvm && \
    pip3 install cmake
 No newline at end of file
# XACC and QCOR
RUN git clone --recursive https://github.com/eclipse/xacc && cd xacc && mkdir build && cd build \
    && cmake .. \
    && make -j$(nproc) install 

RUN cd ../../ && git clone -b master https://github.com/ornl-qci/qcor && cd qcor && mkdir build && cd build \
    && cmake .. -DXACC_DIR=~/.xacc -DLLVM_ROOT=/usr/local/aideqc/llvm -DMLIR_DIR=/usr/local/aideqc/llvm/lib/cmake/mlir -DQCOR_BUILD_TESTS=TRUE \
    && make -j$(nproc) install && ctest --output-on-failure
 No newline at end of file