Skip to content

Commit 52d7689

Browse files
committed
feat: adding circle CI config
1 parent 9faf703 commit 52d7689

File tree

7 files changed

+49
-2
lines changed

7 files changed

+49
-2
lines changed

‎.circleci/config.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
# Python CircleCI 2.0 configuration file
3+
#
4+
# Check https://circleci.com/docs/2.0/language-python/ for more details
5+
#
6+
---
7+
version: 2.1
8+
executors:
9+
# here we can define an executor that will be shared across different jobs
10+
docker-executor:
11+
docker:
12+
- image: docker:stable-dind
13+
# environment:
14+
# ENV_VAR: ENV_VALUE
15+
working_directory: /root/docker
16+
resource_class: medium
17+
jobs:
18+
build-docker-generic:
19+
executor: engine-executor
20+
parameters:
21+
python_version:
22+
type: string
23+
default: "3.7"
24+
docker_type:
25+
type: string
26+
default: "cpu"
27+
28+
steps:
29+
- checkout
30+
- setup_remote_docker
31+
- run:
32+
name: Build image
33+
# docker login -u "$REGISTRY_LOGIN" -p "$REGISTRY_TOKEN"
34+
command: |
35+
docker build ./dockerfiles/<< parameters.python_version >>/<< parameters.docker_type >>/ -t bazire/python:3.7-cpu
36+
workflows:
37+
version: 2
38+
docker-python-build-3.7-cpu:
39+
jobs:
40+
- build-docker-generic:
41+
python_version: "3.7"
42+
docker_type: "cpu"
43+
docker-python-build-3.7-gpu:
44+
jobs:
45+
- build-docker-generic:
46+
python_version: "3.7"
47+
docker_type: "gpu"

‎add-python-debian.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function install_python() {
1010
python_version=$2
1111
# Creating temp folder and entering it
1212
temp_folder
13-
source_url="https://raw.githubusercontent.com/docker-library/python/master/${python_version}/Dockerfile"
13+
source_url="https://raw.githubusercontent.com/docker-library/python/master/${python_version}/buster/slim/Dockerfile"
1414
wget --quiet ${source_url}
1515
# Skip 6 first lines (comment)
1616
tail -n +6 Dockerfile >Dockerfile_trunc

‎build-dockerfiles.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ONE_DNN_VERSION="v0.21.5"
2626
# From https://github.com/docker-library/python/
2727
# Here, we give link to raw content on github, on master
2828

29-
for python_version in "3.7/buster/slim" "3.8/buster/slim"; do
29+
for python_version in "3.7" "3.8"; do
3030
for type in "cpu" "gpu"; do
3131
echo "Building Python ${python_version} for ${type}"
3232
folder="$(readlink -f "${BASH_SOURCE[0]}" | xargs dirname)/dockerfiles/${python_version}/${type}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)