FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/push at master · StudentZhang/docker-python · GitHub
StudentZhang
/
docker-python
Public
forked from
Kaggle/docker-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
push
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
53 lines (44 loc) · 1.12 KB
Breadcrumbs
docker-python
/
push
Copy path
File metadata and controls
executable file
·
53 lines (44 loc) · 1.12 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
set
-e
usage
() {
cat
<<
EOF
Usage:
$0
[OPTIONS] [LABEL]
Push a newly-built image with the given LABEL to gcr.io and DockerHub.
Options:
-g, --gpu Push the image with GPU support.
EOF
}
SOURCE_IMAGE=
'
kaggle/python-build
'
TARGET_IMAGE=
'
gcr.io/kaggle-images/python
'
while
:
;
do
case
"
$1
"
in
-h|--help)
usage
exit
;;
-g|--gpu)
SOURCE_IMAGE=
'
kaggle/python-gpu-build
'
TARGET_IMAGE=
'
gcr.io/kaggle-private-byod/python
'
;;
-
?*
)
usage
printf
'
ERROR: Unknown option: %s\n
'
"
$1
"
>&2
exit
;;
*
)
break
esac
shift
done
LABEL=
${1
:-
testing}
readonly
SOURCE_IMAGE
readonly
TARGET_IMAGE
readonly
LABEL
set
-x
docker tag
"
${SOURCE_IMAGE}
:latest
"
"
${TARGET_IMAGE}
:
${LABEL}
"
gcloud docker -- push
"
${TARGET_IMAGE}
:
${LABEL}
"
#
Only CPU images are made public at this time.
if
[[
"
$LABEL
"
==
"
latest
"
&&
SOURCE_IMAGE
=
"
kaggle/python-build
"
]]
;
then
docker tag
"
${SOURCE_IMAGE}
:latest
"
"
kaggle/python:
${LABEL}
"
docker push
"
kaggle/python:
${LABEL}
"
fi
Back
|
FazBrowse Home
|
New Git URL