Skip to content

Commit a44aaea

Browse files
authored
Add a --prefer-binary flag to 'pip install' command (#2096)
* Pin the h5py version with 3.7.0 Signed-off-by: Yuki Iwai <[email protected]> * Add a --prefer-binary flag to 'pip install' command Signed-off-by: Yuki Iwai <[email protected]> Signed-off-by: Yuki Iwai <[email protected]>
1 parent 5db8349 commit a44aaea

File tree

21 files changed

+37
-37
lines changed

21 files changed

+37
-37
lines changed

.github/workflows/template-setup-e2e-test/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ runs:
2929

3030
- name: Install Katib SDK
3131
shell: bash
32-
run: pip install -e sdk/python/v1beta1
32+
run: pip install --prefer-binary -e sdk/python/v1beta1

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ endif
4242

4343
yamllint:
4444
ifndef HAS_YAMLLINT
45-
pip install yamllint
45+
pip install --prefer-binary yamllint
4646
$(info "yamllint has been installed")
4747
endif
4848
hack/verify-yamllint.sh
@@ -150,16 +150,16 @@ update-boilerplate:
150150
./hack/boilerplate/update-boilerplate.sh
151151

152152
prepare-pytest:
153-
pip install -r test/unit/v1beta1/requirements.txt
154-
pip install -r cmd/suggestion/hyperopt/v1beta1/requirements.txt
155-
pip install -r cmd/suggestion/skopt/v1beta1/requirements.txt
156-
pip install -r cmd/suggestion/optuna/v1beta1/requirements.txt
157-
pip install -r cmd/suggestion/hyperband/v1beta1/requirements.txt
158-
pip install -r cmd/suggestion/nas/enas/v1beta1/requirements.txt
159-
pip install -r cmd/suggestion/nas/darts/v1beta1/requirements.txt
160-
pip install -r cmd/suggestion/pbt/v1beta1/requirements.txt
161-
pip install -r cmd/earlystopping/medianstop/v1beta1/requirements.txt
162-
pip install -r cmd/metricscollector/v1beta1/tfevent-metricscollector/requirements.txt
153+
pip install --prefer-binary -r test/unit/v1beta1/requirements.txt
154+
pip install --prefer-binary -r cmd/suggestion/hyperopt/v1beta1/requirements.txt
155+
pip install --prefer-binary -r cmd/suggestion/skopt/v1beta1/requirements.txt
156+
pip install --prefer-binary -r cmd/suggestion/optuna/v1beta1/requirements.txt
157+
pip install --prefer-binary -r cmd/suggestion/hyperband/v1beta1/requirements.txt
158+
pip install --prefer-binary -r cmd/suggestion/nas/enas/v1beta1/requirements.txt
159+
pip install --prefer-binary -r cmd/suggestion/nas/darts/v1beta1/requirements.txt
160+
pip install --prefer-binary -r cmd/suggestion/pbt/v1beta1/requirements.txt
161+
pip install --prefer-binary -r cmd/earlystopping/medianstop/v1beta1/requirements.txt
162+
pip install --prefer-binary -r cmd/metricscollector/v1beta1/tfevent-metricscollector/requirements.txt
163163

164164
prepare-pytest-testdata:
165165
ifeq ("$(wildcard $(TEST_TENSORFLOW_EVENT_FILE_PATH))", "")

cmd/earlystopping/medianstop/v1beta1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ADD ./${EARLY_STOPPING_DIR}/ ${TARGET_DIR}/${EARLY_STOPPING_DIR}/
1717

1818
WORKDIR ${TARGET_DIR}/${EARLY_STOPPING_DIR}
1919

20-
RUN pip install --no-cache-dir -r requirements.txt
20+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
2121
RUN chgrp -R 0 ${TARGET_DIR} \
2222
&& chmod -R g+rwX ${TARGET_DIR}
2323

cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN if [ "${TARGETARCH}" = "arm64" ]; then \
1717
rm -rf /var/lib/apt/lists/*; \
1818
fi
1919

20-
RUN pip install --no-cache-dir -r requirements.txt
20+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
2121
RUN chgrp -R 0 ${TARGET_DIR} \
2222
&& chmod -R g+rwX ${TARGET_DIR}
2323

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ibmcom/tensorflow-ppc64le:2.2.0-py3
22
ADD . /usr/src/app/github.com/kubeflow/katib
33
WORKDIR /usr/src/app/github.com/kubeflow/katib/cmd/metricscollector/v1beta1/tfevent-metricscollector/
4-
RUN pip install --no-cache-dir -r requirements.txt
4+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
55
ENV PYTHONPATH /usr/src/app/github.com/kubeflow/katib:/usr/src/app/github.com/kubeflow/katib/pkg/apis/manager/v1beta1/python:/usr/src/app/github.com/kubeflow/katib/pkg/metricscollector/v1beta1/tfevent-metricscollector/:/usr/src/app/github.com/kubeflow/katib/pkg/metricscollector/v1beta1/common/
66
ENTRYPOINT ["python", "main.py"]

cmd/suggestion/hyperband/v1beta1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ COPY --from=downloader /bin/grpc_health_probe /bin/grpc_health_probe
2626

2727
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
2828

29-
RUN pip install --no-cache-dir -r requirements.txt
29+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
3030
RUN chgrp -R 0 ${TARGET_DIR} \
3131
&& chmod -R g+rwX ${TARGET_DIR}
3232

cmd/suggestion/hyperopt/v1beta1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV TARGET_DIR /opt/katib
1313
ENV SUGGESTION_DIR cmd/suggestion/hyperopt/v1beta1
1414
ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python
1515

16-
RUN if [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "aarch64" ]; then \
16+
RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \
1717
apt-get -y update && \
1818
apt-get -y install gfortran libopenblas-dev liblapack-dev && \
1919
apt-get clean && \
@@ -26,7 +26,7 @@ COPY --from=downloader /bin/grpc_health_probe /bin/grpc_health_probe
2626

2727
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
2828

29-
RUN pip install --no-cache-dir -r requirements.txt
29+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
3030
RUN chgrp -R 0 ${TARGET_DIR} \
3131
&& chmod -R g+rwX ${TARGET_DIR}
3232

cmd/suggestion/nas/darts/v1beta1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV TARGET_DIR /opt/katib
1313
ENV SUGGESTION_DIR cmd/suggestion/nas/darts/v1beta1
1414
ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python
1515

16-
RUN if [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "aarch64" ]; then \
16+
RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \
1717
apt-get -y update && \
1818
apt-get -y install gfortran libopenblas-dev liblapack-dev && \
1919
apt-get clean && \
@@ -26,7 +26,7 @@ COPY --from=downloader /bin/grpc_health_probe /bin/grpc_health_probe
2626

2727
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
2828

29-
RUN pip install --no-cache-dir -r requirements.txt
29+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
3030
RUN chgrp -R 0 ${TARGET_DIR} \
3131
&& chmod -R g+rwX ${TARGET_DIR}
3232

cmd/suggestion/nas/enas/v1beta1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ENV SUGGESTION_DIR cmd/suggestion/nas/enas/v1beta1
1414
ENV GRPC_HEALTH_PROBE_VERSION v0.4.15
1515
ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python
1616

17-
RUN if [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "aarch64" ]; then \
17+
RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \
1818
apt-get -y update && \
1919
apt-get -y install gfortran libopenblas-dev liblapack-dev && \
2020
apt-get clean && \
@@ -27,7 +27,7 @@ COPY --from=downloader /bin/grpc_health_probe /bin/grpc_health_probe
2727

2828
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
2929

30-
RUN pip install --no-cache-dir -r requirements.txt
30+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
3131
RUN chgrp -R 0 ${TARGET_DIR} \
3232
&& chmod -R g+rwX ${TARGET_DIR}
3333

cmd/suggestion/optuna/v1beta1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV TARGET_DIR /opt/katib
1313
ENV SUGGESTION_DIR cmd/suggestion/optuna/v1beta1
1414
ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python
1515

16-
RUN if [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "aarch64" ]; then \
16+
RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \
1717
apt-get -y update && \
1818
apt-get -y install gfortran libopenblas-dev liblapack-dev && \
1919
apt-get clean && \
@@ -26,7 +26,7 @@ COPY --from=downloader /bin/grpc_health_probe /bin/grpc_health_probe
2626

2727
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
2828

29-
RUN pip install --no-cache-dir -r requirements.txt
29+
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
3030
RUN chgrp -R 0 ${TARGET_DIR} \
3131
&& chmod -R g+rwX ${TARGET_DIR}
3232

0 commit comments

Comments
 (0)