-
Notifications
You must be signed in to change notification settings - Fork 89
/
Dockerfile.py3.aws
93 lines (74 loc) · 3.24 KB
/
Dockerfile.py3.aws
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Build the docker image used to run the scripts
# to continuously update our docker files.
#
# The context for this docker file should be the root of the kubeflow/testing repository.
FROM ubuntu:18.04
RUN apt-get update -y && \
apt-get install -y curl git python3.8 python3-distutils wget build-essential && \
ln -sf /usr/bin/python3.8 /usr/bin/python && \
ln -sf /usr/bin/python3.8 /usr/bin/python3
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
RUN python3.8 -m pip install \
filelock \
fire \
junit-xml \
# See https://github.com/kubeflow/gcp-blueprints/issues/52#issuecomment-645446088
# our libs seem to break with 11.0.0
kubernetes==12.0.0 \
lint \
oauth2client \
pytest==5.4 \
pytest-timeout==1.4 \
python-dateutil \
retrying \
watchdog \
awscli \
boto3
# Install go
RUN cd /tmp && \
wget -O /tmp/go.tar.gz https://dl.google.com/go/go1.17.3.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go.tar.gz
# Install the hub CLI for git
RUN cd /tmp && \
curl -LO https://github.com/github/hub/releases/download/v2.13.0/hub-linux-amd64-2.13.0.tgz && \
tar -xvf hub-linux-amd64-2.13.0.tgz && \
mv hub-linux-amd64-2.13.0 /usr/local && \
ln -sf /usr/local/hub-linux-amd64-2.13.0/bin/hub /usr/local/bin/hub
RUN export KUSTOMIZE_VERSION=3.2.0 && \
cd /tmp && \
curl -LO https://github.com/kubernetes-sigs/kustomize/releases/download/v${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64 && \
mv kustomize_${KUSTOMIZE_VERSION}_linux_amd64 /usr/local/bin/kustomize && \
chmod a+x /usr/local/bin/kustomize
# Install kubectl
RUN curl -LO https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.9/2020-08-04/bin/linux/amd64/kubectl && \
mv kubectl /usr/local/bin && \
chmod a+x /usr/local/bin/kubectl
# Install aws-iam-authenticator
RUN curl -o aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.9/2020-08-04/bin/linux/amd64/aws-iam-authenticator && \
mv aws-iam-authenticator /usr/local/bin && \
chmod a+x /usr/local/bin/aws-iam-authenticator
# Install eksctl
RUN curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp && \
mv /tmp/eksctl /usr/local/bin && \
chmod a+x /usr/local/bin/eksctl
# Install ks
RUN curl --silent --location https://github.com/ksonnet/ksonnet/releases/download/v0.13.1/ks_0.13.1_linux_amd64.tar.gz | tar xz -C /tmp && \
mv /tmp/ks_0.13.1_linux_amd64/ks /usr/local/bin/ks-13 && \
chmod a+x /usr/local/bin/ks-13
# Create go symlinks
RUN ln -sf /usr/local/go/bin/go /usr/local/bin && \
ln -sf /usr/local/go/bin/gofmt /usr/local/bin && \
ln -sf /usr/local/go/bin/godoc /usr/local/bin
RUN go get -u github.com/jstemmer/go-junit-report
COPY ./images/checkout.sh /usr/local/bin
COPY ./images/checkout_repos.sh /usr/local/bin
RUN chmod a+x /usr/local/bin/checkout*
COPY ./images/run_workflows.sh /usr/local/bin
RUN chmod a+x /usr/local/bin/run_workflows.sh
# AWS BASH SCRIPTS
COPY ./images/aws-scripts/*.sh /usr/local/bin/
RUN chmod a+x /usr/local/bin/*.sh
ENV PYTHONPATH /src/kubeflow/testing/py
ENV CLOUD_PROVIDER aws
ENV PATH=/root/go/bin:${PATH}
ENTRYPOINT ["/usr/local/bin/run_workflows.sh"]