Skip to content

Commit bc865fe

Browse files
committed
upgrade the tensorflow version to address some security issues
1 parent 502695a commit bc865fe

File tree

9 files changed

+11
-23
lines changed

9 files changed

+11
-23
lines changed

cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@ FROM python:3.9
22

33
ENV TARGET_DIR /opt/katib
44
ENV METRICS_COLLECTOR_DIR cmd/metricscollector/v1beta1/tfevent-metricscollector
5-
# tensorflow community build for aarch64
6-
# https://github.com/tensorflow/build#tensorflow-builds
7-
ENV PIP_EXTRA_INDEX_URL https://snapshots.linaro.org/ldcg/python-cache/
85

96
ADD ./pkg/ ${TARGET_DIR}/pkg/
107
ADD ./${METRICS_COLLECTOR_DIR}/ ${TARGET_DIR}/${METRICS_COLLECTOR_DIR}/
118
WORKDIR ${TARGET_DIR}/${METRICS_COLLECTOR_DIR}
129

13-
RUN if [ "$(uname -m)" = "aarch64" ]; then \
14-
pip install tensorflow-aarch64==2.7.0; \
15-
else \
16-
pip install tensorflow==2.7.0; \
17-
fi;
1810
RUN pip install --no-cache-dir -r requirements.txt
1911

2012
RUN chgrp -R 0 ${TARGET_DIR} \

cmd/metricscollector/v1beta1/tfevent-metricscollector/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ psutil==5.8.0
22
rfc3339>=6.2
33
grpcio==1.41.1
44
googleapis-common-protos==1.6.0
5+
tensorflow==2.9.0; platform_machine=="x86_64"
6+
# TODO (tenzen-y): Upgrade to 2.9.0 when it is released.
7+
tensorflow-aarch64==2.8.0; platform_machine=="aarch64"

cmd/suggestion/chocolate/v1beta1/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ RUN if [ "$(uname -m)" = "ppc64le" ]; then \
2222
ADD ./pkg/ ${TARGET_DIR}/pkg/
2323
ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/
2424
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
25-
RUN if [ "$(uname -m)" = "aarch64" ]; then \
26-
sed -i -e '$a git+https://github.com/fmder/ghalton@master' -e '/^ghalton/d' requirements.txt; \
27-
fi;
2825
RUN pip install --no-cache-dir -r requirements.txt
2926

3027
RUN chgrp -R 0 ${TARGET_DIR} \

cmd/suggestion/chocolate/v1beta1/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ protobuf==3.19.1
88
googleapis-common-protos==1.6.0
99
SQLAlchemy==1.4.26
1010
git+https://github.com/AIworx-Labs/chocolate@master
11-
ghalton>=0.6.2
11+
ghalton>=0.6.2; platform_machine=="x86_64"
12+
git+https://github.com/fmder/ghalton@master; platform_machine=="aarch64"
1213
cython>=0.29.24

cmd/suggestion/nas/enas/v1beta1/Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ FROM python:3.9
33
ENV TARGET_DIR /opt/katib
44
ENV SUGGESTION_DIR cmd/suggestion/nas/enas/v1beta1
55
ENV GRPC_HEALTH_PROBE_VERSION v0.4.6
6-
# tensorflow community build for aarch64
7-
# https://github.com/tensorflow/build#tensorflow-builds
8-
ENV PIP_EXTRA_INDEX_URL https://snapshots.linaro.org/ldcg/python-cache/
96

107
RUN if [ "$(uname -m)" = "ppc64le" ] || [ "$(uname -m)" = "aarch64" ]; then \
118
apt-get -y update && \
@@ -26,10 +23,6 @@ RUN if [ "$(uname -m)" = "ppc64le" ]; then \
2623
ADD ./pkg/ ${TARGET_DIR}/pkg/
2724
ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/
2825
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
29-
30-
RUN if [ "$(uname -m)" = "aarch64" ]; then \
31-
sed -i 's/tensorflow==/tensorflow-aarch64==/' requirements.txt; \
32-
fi;
3326
RUN pip install --no-cache-dir -r requirements.txt
3427

3528
RUN chgrp -R 0 ${TARGET_DIR} \
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
grpcio==1.41.1
22
protobuf==3.19.1
33
googleapis-common-protos==1.6.0
4-
tensorflow==2.8.0
4+
tensorflow==2.9.0; platform_machine=="x86_64"
5+
# TODO (tenzen-y): Upgrade to 2.9.0 when it is released.
6+
tensorflow-aarch64==2.8.0; platform_machine=="aarch64"
57
cython>=0.29.24

examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.cpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:2.7.0
1+
FROM tensorflow/tensorflow:2.9.0
22

33
ENV TARGET_DIR /opt/enas-cnn-cifar10
44

examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:2.7.0-gpu
1+
FROM tensorflow/tensorflow:2.9.0-gpu
22

33
ENV TARGET_DIR /opt/enas-cnn-cifar10
44

examples/v1beta1/trial-images/tf-mnist-with-summaries/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tensorflow/tensorflow:2.7.0
1+
FROM tensorflow/tensorflow:2.9.0
22

33
ADD examples/v1beta1/trial-images/tf-mnist-with-summaries /opt/tf-mnist-with-summaries
44
WORKDIR /opt/tf-mnist-with-summaries

0 commit comments

Comments
 (0)