Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hep-workloads-GPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HEP-Benchmarks
hep-workloads-GPU
Commits
7428e0f5
Commit
7428e0f5
authored
4 years ago
by
Domenico Giordano
Browse files
Options
Downloads
Patches
Plain Diff
try to speedup build. Kaniko very long
parent
0da2f329
No related branches found
No related tags found
2 merge requests
!16
Qa
,
!15
Qa
Pipeline
#1771713
failed
4 years ago
Stage: triggers
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/cms-patatrack-ci.yml
+22
-2
22 additions, 2 deletions
cms/cms-patatrack-ci.yml
cms/patatrack/ci-scripts/nvidia.Dockerfile.0
+1
-0
1 addition, 0 deletions
cms/patatrack/ci-scripts/nvidia.Dockerfile.0
with
23 additions
and
2 deletions
cms/cms-patatrack-ci.yml
+
22
−
2
View file @
7428e0f5
...
@@ -12,7 +12,7 @@ stages:
...
@@ -12,7 +12,7 @@ stages:
##########################
##########################
## Templates #############
## Templates #############
.definition_build_image
:
&template_build_image
.definition_build_image
_kaniko
:
&template_build_image
_kaniko
tags
:
tags
:
-
hep-workload-gpu-docker-builder
-
hep-workload-gpu-docker-builder
image
:
# NB enable shared runners and do not specify a CI tag
image
:
# NB enable shared runners and do not specify a CI tag
...
@@ -28,7 +28,6 @@ stages:
...
@@ -28,7 +28,6 @@ stages:
-
if [[ -z $IMAGE_TAG ]]; then echo "ERROR variable IMAGE_TAG is not defined "; exit 1; fi
-
if [[ -z $IMAGE_TAG ]]; then echo "ERROR variable IMAGE_TAG is not defined "; exit 1; fi
-
export DESTINATIONS="--destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}"
-
export DESTINATIONS="--destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}"
-
echo "DESTINATIONS $DESTINATIONS"
-
echo "DESTINATIONS $DESTINATIONS"
-
docker rmi -f $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG || echo "image $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG does not exist"
# Prepare Kaniko configuration file
# Prepare Kaniko configuration file
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
# Build and push the image from the Dockerfile at the root of the project.
# Build and push the image from the Dockerfile at the root of the project.
...
@@ -36,6 +35,27 @@ stages:
...
@@ -36,6 +35,27 @@ stages:
# See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference for available variables
# See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference for available variables
-
/kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE $DESTINATIONS
-
/kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE $DESTINATIONS
.definition_build_image_kaniko
:
&template_build_image_kaniko
tags
:
-
hep-workload-gpu-docker-builder
image
:
name
:
gitlab-registry.cern.ch/hep-benchmarks/hep-workloads-builder/dind:qa
# Use instead of kaniko
entrypoint
:
[
"
/bin/bash"
]
script
:
-
echo "current commit is ${CI_COMMIT_SHA:0:8}"
-
echo "current branch is ${CI_COMMIT_BRANCH}"
-
echo "current tag is ${CI_COMMIT_TAG}"
-
if [[ -z $DOCKERFILE ]]; then echo "ERROR variable DOCKERFILE is not defined "; exit 1; fi
-
if [[ -z $CONTEXT ]]; then echo "ERROR variable CONTEXT is not defined "; exit 1; fi
-
if [[ -z $IMAGE_NAME ]]; then echo "ERROR variable IMAGE_NAME is not defined "; exit 1; fi
-
if [[ -z $IMAGE_TAG ]]; then echo "ERROR variable IMAGE_TAG is not defined "; exit 1; fi
-
docker rmi -f $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG || echo "image $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG does not exist"
-
echo $CI_BUILD_TOKEN | docker login -u gitlab-ci-token --password-stdin gitlab-registry.cern.ch
-
docker build --no-cache -t $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8} -f $DOCKERFILE $CONTEXT
-
dockert tag $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8} $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-
docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}
-
docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-
docker rmi $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}
###########################################################
###########################################################
# docker in docker image: to trigger other docker runs
# docker in docker image: to trigger other docker runs
...
...
This diff is collapsed.
Click to expand it.
cms/patatrack/ci-scripts/nvidia.Dockerfile.0
+
1
−
0
View file @
7428e0f5
# FIXME: need to build in gitlab this base image. Was done by hand
FROM nvidia/cuda:10.1-devel-centos7
FROM nvidia/cuda:10.1-devel-centos7
RUN yum install -y \
RUN yum install -y \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment