Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 08bb6fe

Browse files
authored
Merge pull request #2 from intel-sandbox/ci
CI
2 parents fe43b43 + c136fb9 commit 08bb6fe

File tree

3 files changed

+58
-11
lines changed

3 files changed

+58
-11
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on: [push, pull_request]
2+
3+
defaults:
4+
run:
5+
shell: bash
6+
7+
jobs:
8+
build_and_test:
9+
name: building and testing ddptensor
10+
runs-on: self-hosted
11+
container:
12+
image: amr-registry-pre.caas.intel.com/tpi/ddpt
13+
options: --device=/dev/dri --shm-size=3000M
14+
strategy:
15+
fail-fast: false
16+
steps:
17+
- name: Setup
18+
run: . activate ddpt
19+
- name: Checkout ddptensor and submodules
20+
uses: actions/checkout@v2
21+
with:
22+
submodules: recursive
23+
- name: Build dpptensor
24+
run: |
25+
. activate ddpt
26+
g++ -v
27+
export MPIROOT=$CONDA_PREFIX
28+
export MKLROOT=$CONDA_PREFIX
29+
CMAKE_BUILD_PARALLEL_LEVEL=8 python setup.py develop
30+
- name: Run tests
31+
run: |
32+
. activate ddpt
33+
pytest test
34+
DDPT_CW=0 pytest test
35+
DDPT_CW=1 pytest test
36+
DDPT_MPI_SPAWN=1 PYTHON_EXE=`which python` pytest test
37+
DDPT_MPI_SPAWN=2 PYTHON_EXE=`which python` pytest test
38+
DDPT_MPI_SPAWN=3 PYTHON_EXE=`which python` pytest test
39+
DDPT_CW=1 mpirun -n 1 python -m pytest test
40+
DDPT_CW=1 mpirun -n 2 python -m pytest test
41+
DDPT_CW=1 mpirun -n 3 python -m pytest test
42+
DDPT_CW=1 mpirun -n 4 python -m pytest test
43+
DDPT_CW=0 mpirun -n 1 python -m pytest test
44+
DDPT_CW=0 mpirun -n 2 python -m pytest test
45+
DDPT_CW=0 mpirun -n 3 python -m pytest test
46+
DDPT_CW=0 mpirun -n 4 python -m pytest test

docker/Dockerfile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,21 @@
22
# are last
33
FROM ubuntu:20.04
44

5-
# Proxies for working inside firewall
6-
ENV no_proxy=.intel.com
7-
ENV https_proxy=http://proxy-chain.intel.com:912
8-
ENV http_proxy=http://proxy-chain.intel.com:911
9-
ENV ftp_proxy=http://proxy-chain.intel.com:911
10-
115
RUN export DEBIAN_FRONTEND=noninteractive \
126
&& apt-get update \
13-
&& apt-get install -y --no-install-recommends g++ gcc wget \
7+
&& apt-get install -y --no-install-recommends g++ gcc wget make git ca-certificates \
148
&& apt-get clean \
159
&& rm -rf /var/lib/apt/lists/*
1610

1711
ENV MINICONDA=Miniconda3-latest-Linux-x86_64.sh
12+
COPY conda-env.yml /tmp/conda-env.yml
1813
RUN wget -q --no-check-certificate https://repo.anaconda.com/miniconda/$MINICONDA \
1914
&& chmod a+rwx $MINICONDA \
2015
&& ./$MINICONDA -b \
2116
&& rm ./$MINICONDA \
22-
&& /root/miniconda3/bin/conda update -n base -c defaults conda
17+
&& /root/miniconda3/bin/conda update -y -n base -c defaults conda \
18+
&& /root/miniconda3/bin/conda env create -n ddpt -f /tmp/conda-env.yml \
19+
&& /root/miniconda3/bin/conda clean -y -a \
20+
&& /root/miniconda3/bin/conda init bash
2321

2422
ENV PATH=${PATH}:/root/miniconda3/bin
25-
26-
SHELL ["/bin/bash", "--login", "-c"]
27-
ENTRYPOINT ["/bin/bash", "--login", "-c"]

docker/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
IMAGE = amr-registry-pre.caas.intel.com/tpi/ddpt:latest
2+
3+
all:
4+
cp ../conda-env.yml .
5+
docker build --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --tag ${IMAGE} .
6+
docker push ${IMAGE}

0 commit comments

Comments
 (0)