Commit f1e5ba12 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

adding docker deploy image

parent 195a6752
Loading
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
stages:
  - build

docker build_devel:
  stage: build
  only:
  - devel
  script:
  - cd docker/ci/ubuntu1804/devel && docker build -t qcor/devel-ci . --no-cache
  - deploy

docker build_master:
  stage: build
@@ -14,4 +8,16 @@ docker build_master:
  - master
  script:
  - cd docker/ci/ubuntu1804/master && docker build -t qcor/master-ci . --no-cache
  - git config remote.aideqcqcor.url >&- || git remote add -t master aideqcqcor https://amccaskey:$AIDEQC_ACCESS_TOKEN@github.com/aide-qc/qcor
  - git push -f aideqcqcor HEAD:master
  - git remote remove aideqcqcor

docker run_docker_deploy:
  stage: deploy
  only:
   - schedules
  script:
  - cd docker/deploy/dev && docker build -t qcor/qcor . --no-cache
  - echo "$REGISTRY_PASSWORD" | docker login -u qcor --password-stdin
  - docker push qcor/qcor
  - docker system prune -f 
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
from qcor/qcor-base
run git clone --recursive https://github.com/eclipse/xacc && cd xacc && mkdir build && cd build \
    && cmake .. \
    && make -j$(nproc) install \
    && cd ../../ && git clone -b master https://github.com/ornl-qci/qcor && cd qcor && mkdir build && cd build \
    && 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 -DQCOR_BUILD_TESTS=TRUE \
    && make -j$(nproc) install 
 No newline at end of file
+8 −0
Original line number Diff line number Diff line
FROM xacc/deploy-base

run apt-get update && apt-get install -y ninja-build \
    && git clone https://github.com/hfinkel/llvm-project-csp llvm \
    && cd llvm && mkdir build && cd build \
    && cmake -G Ninja ../llvm -DCMAKE_INSTALL_PREFIX=$HOME/.llvm -DBUILD_SHARED_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS=clang \
    && cmake --build . --target install \
    && ln -sf $HOME/.llvm/bin/llvm-config /usr/bin/ && cd ../../ && rm -rf /llvm /var/lib/apt/lists/*
+14 −0
Original line number Diff line number Diff line
{
    "cpp.clangTidy": true,
    "cpp.buildConfigurations": [
      {
         "name": "xacc",
         "directory": "/home/dev/xacc/build"
      },
      {
         "name": "tnqvm",
         "directory": "/home/dev/tnqvm/build"
      }
   ],
   "editor.autoSave": "on"
}
+35 −0
Original line number Diff line number Diff line
from qcor/deploy-base
workdir /home/dev
run cd /home/dev && git clone --recursive https://github.com/eclipse/xacc && cd xacc && mkdir build && cd build \
    && cmake .. \
    && make -j$(nproc) install \
    && cd ../../ && git clone https://github.com/ornl-qci/tnqvm && cd tnqvm && mkdir build && cd build \
    && cmake .. -DXACC_DIR=~/.xacc && make -j$(nproc) install \
    && cd /home/dev && git clone -b maint https://bitbucket.org/petsc/petsc petsc && cd petsc \
    && export PETSC_DIR=${PWD} && export PETSC_ARCH=linux-gnu-c-complex \
    && ./configure --with-scalar-type=complex --download-mpich --download-fblaslapack=1 \
                   --with-debugging=no COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 --with-64-bit-indices \
    && make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} all \
    && cd /home/dev && git clone -b xacc-integration https://github.com/ORNL-QCI/QuaC.git \
    && cd QuaC && mkdir build && cd build \
    && cmake .. -DPETSC_DIR=${PETSC_DIR} -DPETSC_ARCH=linux-gnu-c-complex -DXACC_DIR=~/.xacc \
    && make install \
    && cd /home/dev && git clone https://github.com/ornl-qci/qcor && cd qcor && mkdir build && cd build \
    && cmake .. && make -j$(nproc) install 

# Theia application
workdir /home/dev
ARG version=latest
ADD $version.package.json ./package.json

RUN yarn --cache-folder ./ycache && rm -rf ./ycache && \
    NODE_OPTIONS="--max_old_space_size=4096" yarn theia build ;\
    yarn theia download:plugins
EXPOSE 3000
ENV SHELL=/bin/bash \
    THEIA_DEFAULT_PLUGINS=local-dir:/home/dev/plugins
ENV PYTHONPATH "${PYTHONPATH}:/root/.xacc:/root/.local/lib/python3.6/site-packages/psi4/lib"
ENV PATH "${PATH}:/root/.xacc/bin"

ENTRYPOINT [ "yarn", "theia", "start", "/home/dev", "--hostname=0.0.0.0" ]
Loading