From d6c426f87c2276a94a374e900d33322499567828 Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Sat, 27 Mar 2021 19:14:24 -0500
Subject: [PATCH] Added gitlab CI/CD pipeline

---
 .gitlab-ci.yml | 12 ++++++++++++
 Dockerfile     | 18 ++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000..8afcf5489c
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,12 @@
+image: hpvm/gitlab-ci
+
+build:
+  stage: build
+  tags:
+    - hpvm
+  script:
+    - source activate hpvm
+    - cd hpvm
+    - ./install.sh -j32 -t "X86"
+  only:
+    - approx_hpvm_devops
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..a78b777f6a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+ARG IMAGE_NAME=nvidia/cuda
+FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
+
+# Install dependencies: cmake, python 3.6, wget
+RUN apt-get update && apt-get install -y --no-install-recommends cmake python3 curl git
+
+# Install conda
+RUN curl https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh -o anaconda.sh && \
+    bash anaconda.sh -b && rm anaconda.sh
+
+# Set PATH to include conda
+ENV PATH="/root/anaconda3/bin:${PATH}"
+
+# Send conda env spec into container
+COPY . /root/hpvm/
+
+# Create conda env named hpvm based on spec
+RUN conda env create -n hpvm -f /root/hpvm/hpvm/env.yaml
-- 
GitLab