-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-installer.yml
62 lines (53 loc) · 1.98 KB
/
docker-installer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
pr:
- main
pool:
vmImage: ubuntu-latest
variables:
PYTHON: 'python3.8'
INC_VER: '1.12'
IMAGE_NAME: 'neural-compressor'
IMAGE_TAG: '1.12'
INC_BRANCH: 'master'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build
steps:
- task: Docker@2
displayName: Login to repo
inputs:
command: login
containerRegistry: inc-internal
- script: |
echo "pass"
#docker pull amr-registry-pre.caas.intel.com/neural-compressor/test-inc:v1.12
#workspace=`pwd`
#rm ${workspace}/cert.zip
#http_proxy='' && curl http://certificates.intel.com/repository/certificates/IntelSHA2RootChain-Base64.zip -o cert.zip
#ls -l ${workspace}
#sudo unzip -o ${workspace}/cert.zip -d /usr/local/share/ca-certificates/
#rm ${workspace}/cert.zip
#ls -l ${workspace}
#sudo update-ca-certificates || sudo update-ca-trust
#sudo service docker restart
displayName: 'Add certificate'
- script: docker build --build-arg PYTHON=${PYTHON} --build-arg INC_BRANCH=${INC_BRANCH} -f docker/Dockerfile.devel -t ${IMAGE_NAME}:${IMAGE_TAG} .
displayName: 'Build Container'
- script: |
docker tag ${IMAGE_NAME}:${IMAGE_TAG} amr-registry-pre.caas.intel.com/neural-compressor/test-inc:${IMAGE_TAG}
displayName: 'Tag Container'
- script: |
docker images | grep -i neural-compressor
displayName: 'Check docker'
- script: |
docker run --init --name=test-inc -d -u root:root ${IMAGE_NAME}:${IMAGE_TAG} tail -f /dev/null
docker exec test-inc pip install intel-tensorflow==2.9.1
docker exec test-inc pwd && ls -l && pip list
docker exec test-inc python test/test.py
displayName: 'Run python sciprt'