Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated base image to support Multi arch #13

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

modassarrana89
Copy link

@modassarrana89 modassarrana89 commented May 1, 2024

Base image in the dockerfile is compliant to amd64 only
Updated it with the multi-arch & tested that it is building multi-arch successfully
Screenshot 2024-05-01 at 16 26 28

Fixes #12

Updated base image , as it is multi-arch 

Signed-off-by: Modassar Rana <[email protected]>
Updated base image which is multi-arch & builds successfully for all arch

Signed-off-by: Modassar Rana <[email protected]>
@oss-prow-bot oss-prow-bot bot requested review from ckadner and rafvasq May 1, 2024 10:56
@modassarrana89
Copy link
Author

Minio pod is coming up succesfully while deploying modelmesh on s390x

[root@m1305001 modelmesh-serving]# oc get all -n modelmesh-serving
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
NAME                                                READY   STATUS    RESTARTS   AGE
pod/etcd-78ff7867d5-nfkl5                           1/1     Running   0          4m52s
pod/minio-5b4bcd7d4f-9zzqs                          1/1     Running   0          4m52s
pod/modelmesh-controller-679f9d9d88-w2h75           1/1     Running   0          4m43s
pod/modelmesh-serving-triton-2.x-68c49d4588-lsfz9   4/4     Running   0        4m12s
pod/modelmesh-serving-triton-2.x-68c49d4588-pf9xz   4/4     Running   0          32s

NAME                                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/etcd                               ClusterIP   172.30.61.199    <none>        2379/TCP                     4m52s
service/minio                              ClusterIP   172.30.138.251   <none>        9000/TCP                     4m52s
service/modelmesh-serving                  ClusterIP   None             <none>        8033/TCP,8008/TCP,2112/TCP   4m37s
service/modelmesh-webhook-server-service   ClusterIP   172.30.41.10     <none>        9443/TCP                     4m47s

NAME                                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/etcd                           1/1     1            1           4m52s
deployment.apps/minio                          1/1     1            1           4m52s
deployment.apps/modelmesh-controller           1/1     1            1           4m47s
deployment.apps/modelmesh-serving-triton-2.x   2/2     2            2           4m12s

NAME                                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/etcd-78ff7867d5                           1         1         1       4m52s
replicaset.apps/minio-5b4bcd7d4f                          1         1         1       4m52s
replicaset.apps/modelmesh-controller-679f9d9d88           1         1         1       4m46s
replicaset.apps/modelmesh-controller-7c957f4d5            0         0         0       4m47s
replicaset.apps/modelmesh-serving-triton-2.x-68c49d4588   2         2         2       4m12s

@modassarrana89
Copy link
Author

@ckadner @rafvasq Please review & do the needful

@modassarrana89
Copy link
Author

/assign @rafvasq

@rafvasq rafvasq requested a review from israel-hdez May 9, 2024 18:35
Copy link
Member

@rafvasq rafvasq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @modassarrana89. Leaving a couple of links to relevant work here as we look into this more. Based on these references, I'm assuming that there might more be to this update than it seems:

@modassarrana89
Copy link
Author

Thanks @modassarrana89. Leaving a couple of links to relevant work here as we look into this more. Based on these references, I'm assuming that there might more be to this update than it seems:

I agree , it would be great if you can validate the change . For me , its working fine & is multi-arch compared to the old base image which is not multi-arch

@israel-hdez
Copy link
Collaborator

israel-hdez commented May 17, 2024

As expected from more recent Minio versions:

  • The container image builds correctly.
  • When running the built container, it starts correctly.
  • Inspecting inside the container filesystem, it reveals that the example models are copied correctly.
  • Interacting with the minio service using the mc CLI, shows the expected bucket exists, and the expected directory tree is there.
  • Unfortunately, all directories are empty; i.e. there are no files, just the directories.

Thus, the image is not really usable. I don't think we can accept the PR as is.

Copy link
Member

@ckadner ckadner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @israel-hdez for your review!

As expected from more recent Minio versions:

  • The container image builds correctly.
  • When running the built container, it starts correctly.
  • Inspecting inside the container filesystem, it reveals that the example models are copied correctly.
  • Interacting with the minio service using the mc CLI, shows the expected bucket exists, and the expected directory tree is there.
  • Unfortunately, all directories are empty; i.e. there are no files, just the directories.

Thus, the image is not really usable. I don't think we can accept the PR as is.

@modassarrana89 can you take a look at PR #8 and make equivalent changes to this PR, indicating @bdattoma as a co-author!

Copy link

oss-prow-bot bot commented May 27, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: *modassarrana89* **Once this PR has been reviewed and has the lgtm label**, please ask for approval from rafvasq by writing `/assign @rafvasq` in a comment. For more information see:[The Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@modassarrana89
Copy link
Author

Thanks @israel-hdez for your review!

As expected from more recent Minio versions:

  • The container image builds correctly.
  • When running the built container, it starts correctly.
  • Inspecting inside the container filesystem, it reveals that the example models are copied correctly.
  • Interacting with the minio service using the mc CLI, shows the expected bucket exists, and the expected directory tree is there.
  • Unfortunately, all directories are empty; i.e. there are no files, just the directories.

Thus, the image is not really usable. I don't think we can accept the PR as is.

@modassarrana89 can you take a look at PR #8 and make equivalent changes to this PR, indicating @bdattoma as a co-author!

ok.

@modassarrana89
Copy link
Author

@israel-hdez @ckadner I have updated the base image ( multi-arch ) & verified on x86 + s390x , files are getting created . Directory are not empty .
Snapshot of base Image :-
Screenshot 2024-10-28 at 15 29 58

[root@m1305001 modelmesh-minio-examples]# podman build -t minio-example .
[1/2] STEP 1/16: FROM docker.io/minio/minio:RELEASE.2021-06-17T00-10-46Z AS minio-examples
Trying to pull docker.io/minio/minio:RELEASE.2021-06-17T00-10-46Z...
Getting image source signatures
Copying blob ac14d85f18ff done  
Copying blob 36c462461b28 done  
Copying blob 5109b6b849aa done  
Copying blob ffa9ece6c97d done  
Copying blob ff27a56ec10e done  
Copying blob f8832fbedd60 done  
Copying blob c9bc1b72e54e done  
Copying config 4e2510b441 done  
Writing manifest to image destination
Storing signatures
[1/2] STEP 2/16: EXPOSE 9000
--> 118812453a5
[1/2] STEP 3/16: ARG MODEL_DIR=/data1/modelmesh-example-models
--> 3554545b344
[1/2] STEP 4/16: USER root
--> a4555baa18f
[1/2] STEP 5/16: RUN useradd -u 1000 -g 0 modelmesh
--> a4342bde2f9
[1/2] STEP 6/16: RUN mkdir -p ${MODEL_DIR}
--> c118233af57
[1/2] STEP 7/16: RUN chown -R 1000:0 /data1 &&     chgrp -R 0 /data1 &&     chmod -R g=u /data1
--> 0168746dec5
[1/2] STEP 8/16: COPY --chown=1000:0 keras      ${MODEL_DIR}/keras/
--> 36d16a9da66
[1/2] STEP 9/16: COPY --chown=1000:0 lightgbm   ${MODEL_DIR}/lightgbm/
--> bb39790b3de
[1/2] STEP 10/16: COPY --chown=1000:0 onnx       ${MODEL_DIR}/onnx/
--> 58a0fbee559
[1/2] STEP 11/16: COPY --chown=1000:0 pytorch    ${MODEL_DIR}/pytorch/
--> ac8103c585a
[1/2] STEP 12/16: COPY --chown=1000:0 sklearn    ${MODEL_DIR}/sklearn/
--> 57a8da57d9c
[1/2] STEP 13/16: COPY --chown=1000:0 tensorflow ${MODEL_DIR}/tensorflow/
--> ad10fee182a
[1/2] STEP 14/16: COPY --chown=1000:0 xgboost    ${MODEL_DIR}/xgboost/
--> 291f9d1bf66
[1/2] STEP 15/16: COPY --chown=1000:0 tensorflow/mnist ${MODEL_DIR}/tensorflow/mnist.savedmodel/
--> 601e9790698
[1/2] STEP 16/16: USER 1000
--> eff0c55b85f
[2/2] STEP 1/11: FROM eff0c55b85f618e74db69218d60e3ff0518b81574eca07b240d8c3f1d5320bea AS minio-fvt
[2/2] STEP 2/11: ARG FVT_DIR=/data1/modelmesh-example-models/fvt
--> 10bae2c55d9
[2/2] STEP 3/11: USER root
--> 40838b02ea6
[2/2] STEP 4/11: COPY --chown=1000:0 fvt ${FVT_DIR}/
--> 2c818361fd4
[2/2] STEP 5/11: COPY --chown=1000:0 keras                    ${FVT_DIR}/keras/
--> a1b678976d8
[2/2] STEP 6/11: COPY --chown=1000:0 keras                    ${FVT_DIR}/tensorflow/keras-mnist/
--> 8d22e7959ff
[2/2] STEP 7/11: COPY --chown=1000:0 keras                    ${FVT_DIR}/tensorflow/keras-mnistnew/
--> adda83222f4
[2/2] STEP 8/11: COPY --chown=1000:0 tensorflow/mnist         ${FVT_DIR}/tensorflow/mnist.savedmodel/
--> e2f0b883df2
[2/2] STEP 9/11: COPY --chown=1000:0 tensorflow/mnist         ${FVT_DIR}/tensorflow/mnist-dup.savedmodel/
--> d360f3bc48f
[2/2] STEP 10/11: COPY --chown=1000:0 fvt/pytorch/pytorch-mar  ${FVT_DIR}/pytorch/pytorch-mar-dup/
--> b8c07303618
[2/2] STEP 11/11: USER 1000
[2/2] COMMIT minio-example
--> 43ac488cc30
Successfully tagged localhost/minio-example:latest
43ac488cc3011737f249a5bd875c7076c31e05198705cea404436cae16b4e096
[root@m1305001 modelmesh-minio-examples]# podman run --rm --name "modelmesh-minio-examples" -u "1000" -p "9000:9000" -e "MINIO_ACCESS_KEY=minioadmin" -e "MINIO_SECRET_KEY=minioadmin" localhost/minio-example:latest server /data1
WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
         Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD

 You are running an older version of MinIO released 3 years ago 
 Update: Run `mc admin update` 


Endpoint: http://10.88.0.7:9000  http://127.0.0.1:9000     

Browser Access:
   http://10.88.0.7:9000  http://127.0.0.1:9000    

Object API (Amazon S3 compatible):
   Go:         https://docs.min.io/docs/golang-client-quickstart-guide
   Java:       https://docs.min.io/docs/java-client-quickstart-guide
   Python:     https://docs.min.io/docs/python-client-quickstart-guide
   JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
   .NET:       https://docs.min.io/docs/dotnet-client-quickstart-guide
Detected default credentials 'minioadmin:minioadmin', please change the credentials immediately by setting 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment values
IAM initialization complete


[root@m1305001 ~]# ~/minio-binaries/mc alias set localminio http://localhost:9000 minioadmin minioadmin
Added `localminio` successfully.
[root@m1305001 ~]# ~/minio-binaries/mc ls -r localminio/modelmesh-example-models/
[2024-10-23 09:37:27 CEST] 6.2MiB STANDARD fvt/keras/mnist.h5
[2024-10-23 09:37:27 CEST]     0B STANDARD fvt/lightgbm/mushroom-dup/dummy
[2024-10-23 09:37:27 CEST]    58B STANDARD fvt/lightgbm/mushroom-dup/model-settings.json
[2024-10-23 09:37:27 CEST] 277KiB STANDARD fvt/lightgbm/mushroom-dup/model.bst
[2024-10-23 09:37:27 CEST] 277KiB STANDARD fvt/lightgbm/mushroom-fil-dup/1/model.txt
[2024-10-23 09:37:27 CEST]   387B STANDARD fvt/lightgbm/mushroom-fil-dup/config.pbtxt
[2024-10-23 09:37:27 CEST] 277KiB STANDARD fvt/lightgbm/mushroom-fil/1/model.txt
[2024-10-23 09:37:27 CEST]   387B STANDARD fvt/lightgbm/mushroom-fil/config.pbtxt
[2024-10-23 09:37:27 CEST] 277KiB STANDARD fvt/lightgbm/mushroom.bst
[2024-10-23 09:37:27 CEST]    58B STANDARD fvt/lightgbm/mushroom/model-settings.json
[2024-10-23 09:37:27 CEST] 277KiB STANDARD fvt/lightgbm/mushroom/model.bst
[2024-10-23 09:37:27 CEST]  26KiB STANDARD fvt/onnx/onnx-mnist-new/mnist-8.onnx
[2024-10-23 09:37:27 CEST]  26KiB STANDARD fvt/onnx/onnx-mnist/mnist-8.onnx
[2024-10-23 09:37:27 CEST]  26KiB STANDARD fvt/onnx/onnx-withschema-new/1/model.onnx
[2024-10-23 09:37:27 CEST]    41B STANDARD fvt/onnx/onnx-withschema-new/config.pbtxt
[2024-10-23 09:37:27 CEST]  26KiB STANDARD fvt/onnx/onnx-withschema/1/model.onnx
[2024-10-23 09:37:27 CEST]    41B STANDARD fvt/onnx/onnx-withschema/config.pbtxt
[2024-10-23 09:37:27 CEST]   229B STANDARD fvt/onnx/schema/schema.json
[2024-10-23 09:37:27 CEST]  23KiB STANDARD fvt/openvino/mnist-dup/mnist.bin
[2024-10-23 09:37:27 CEST] 2.5KiB STANDARD fvt/openvino/mnist-dup/mnist.mapping
[2024-10-23 09:37:27 CEST]  11KiB STANDARD fvt/openvino/mnist-dup/mnist.xml
[2024-10-23 09:37:27 CEST]  23KiB STANDARD fvt/openvino/mnist/mnist.bin
[2024-10-23 09:37:27 CEST] 2.5KiB STANDARD fvt/openvino/mnist/mnist.mapping
[2024-10-23 09:37:27 CEST]  11KiB STANDARD fvt/openvino/mnist/mnist.xml
[2024-10-23 09:37:27 CEST] 253KiB STANDARD fvt/pytorch/pytorch-cifar-new/1/model.pt
[2024-10-23 09:37:27 CEST]   284B STANDARD fvt/pytorch/pytorch-cifar-new/config.pbtxt
[2024-10-23 09:37:27 CEST] 253KiB STANDARD fvt/pytorch/pytorch-cifar-schema/1/model.pt
[2024-10-23 09:37:27 CEST]    18B STANDARD fvt/pytorch/pytorch-cifar-schema/config.pbtxt
[2024-10-23 09:37:27 CEST] 253KiB STANDARD fvt/pytorch/pytorch-cifar/1/model.pt
[2024-10-23 09:37:27 CEST]   284B STANDARD fvt/pytorch/pytorch-cifar/config.pbtxt
[2024-10-23 09:37:27 CEST] 4.3MiB STANDARD fvt/pytorch/pytorch-mar-dup/mnist.mar
[2024-10-23 09:37:27 CEST] 4.3MiB STANDARD fvt/pytorch/pytorch-mar/mnist.mar
[2024-10-23 09:37:27 CEST]   226B STANDARD fvt/pytorch/schema/schema.json
[2024-10-23 09:37:27 CEST]   126B STANDARD fvt/sklearn/mnist-svm/model-settings.json
[2024-10-23 09:37:27 CEST] 337KiB STANDARD fvt/sklearn/mnist-svm/model.joblib
[2024-10-23 09:37:27 CEST] 6.2MiB STANDARD fvt/tensorflow/keras-mnist/mnist.h5
[2024-10-23 09:37:27 CEST] 6.2MiB STANDARD fvt/tensorflow/keras-mnistnew/mnist.h5
[2024-10-23 09:37:27 CEST]  82KiB STANDARD fvt/tensorflow/mnist-dup.savedmodel/saved_model.pb
[2024-10-23 09:37:27 CEST]  38MiB STANDARD fvt/tensorflow/mnist-dup.savedmodel/variables/variables.data-00000-of-00001
[2024-10-23 09:37:27 CEST]   923B STANDARD fvt/tensorflow/mnist-dup.savedmodel/variables/variables.index
[2024-10-23 09:37:27 CEST]  82KiB STANDARD fvt/tensorflow/mnist.savedmodel/saved_model.pb
[2024-10-23 09:37:27 CEST]  38MiB STANDARD fvt/tensorflow/mnist.savedmodel/variables/variables.data-00000-of-00001
[2024-10-23 09:37:27 CEST]   923B STANDARD fvt/tensorflow/mnist.savedmodel/variables/variables.index
[2024-10-23 09:37:27 CEST]   228B STANDARD fvt/tensorflow/schema/tf-schema.json
[2024-10-23 09:37:27 CEST]   163B STANDARD fvt/tensorflow/schema/tf-schema.json.new
[2024-10-23 09:37:27 CEST]    56B STANDARD fvt/xgboost/mushroom-dup/model-settings.json
[2024-10-23 09:37:27 CEST] 3.0KiB STANDARD fvt/xgboost/mushroom-dup/model.json
[2024-10-23 09:37:27 CEST] 3.0KiB STANDARD fvt/xgboost/mushroom-fil-dup/1/xgboost.json
[2024-10-23 09:37:27 CEST]   391B STANDARD fvt/xgboost/mushroom-fil-dup/config.pbtxt
[2024-10-23 09:37:27 CEST] 3.0KiB STANDARD fvt/xgboost/mushroom-fil/1/xgboost.json
[2024-10-23 09:37:27 CEST]   391B STANDARD fvt/xgboost/mushroom-fil/config.pbtxt
[2024-10-23 09:37:27 CEST]    56B STANDARD fvt/xgboost/mushroom/model-settings.json
[2024-10-23 09:37:27 CEST] 3.0KiB STANDARD fvt/xgboost/mushroom/model.json
[2024-10-23 09:37:27 CEST] 6.2MiB STANDARD keras/mnist.h5
[2024-10-23 09:37:27 CEST] 277KiB STANDARD lightgbm/lightgbm-fil/1/model.txt
[2024-10-23 09:37:27 CEST]   387B STANDARD lightgbm/lightgbm-fil/config.pbtxt
[2024-10-23 09:37:27 CEST] 277KiB STANDARD lightgbm/mushroom.bst
[2024-10-23 09:37:27 CEST]  26KiB STANDARD onnx/mnist.onnx
[2024-10-23 09:37:27 CEST]   229B STANDARD onnx/schema/schema.json
[2024-10-23 09:37:27 CEST] 253KiB STANDARD pytorch/cifar/1/model.pt
[2024-10-23 09:37:27 CEST]   284B STANDARD pytorch/cifar/config.pbtxt
[2024-10-23 09:37:27 CEST] 337KiB STANDARD sklearn/mnist-svm.joblib
[2024-10-23 09:37:27 CEST]  82KiB STANDARD tensorflow/mnist.savedmodel/saved_model.pb
[2024-10-23 09:37:27 CEST]  38MiB STANDARD tensorflow/mnist.savedmodel/variables/variables.data-00000-of-00001
[2024-10-23 09:37:27 CEST]   923B STANDARD tensorflow/mnist.savedmodel/variables/variables.index
[2024-10-23 09:37:27 CEST]  82KiB STANDARD tensorflow/mnist/saved_model.pb
[2024-10-23 09:37:27 CEST]  38MiB STANDARD tensorflow/mnist/variables/variables.data-00000-of-00001
[2024-10-23 09:37:27 CEST]   923B STANDARD tensorflow/mnist/variables/variables.index
[2024-10-23 09:37:27 CEST]   696B STANDARD tensorflow/simple_string/1/model.graphdef
[2024-10-23 09:37:27 CEST]   382B STANDARD tensorflow/simple_string/config.pbtxt
[2024-10-23 09:37:27 CEST] 3.0KiB STANDARD xgboost/mushroom-fil/1/xgboost.json
[2024-10-23 09:37:27 CEST]   391B STANDARD xgboost/mushroom-fil/config.pbtxt
[2024-10-23 09:37:27 CEST] 3.0KiB STANDARD xgboost/mushroom.json

@modassarrana89
Copy link
Author

modassarrana89 commented Oct 28, 2024

As expected from more recent Minio versions:

  • The container image builds correctly.
  • When running the built container, it starts correctly.
  • Inspecting inside the container filesystem, it reveals that the example models are copied correctly.
  • Interacting with the minio service using the mc CLI, shows the expected bucket exists, and the expected directory tree is there.
  • Unfortunately, all directories are empty; i.e. there are no files, just the directories.

Thus, the image is not really usable. I don't think we can accept the PR as is.

@israel-hdez I have update the changes & directories are not empty . I have tested & verified the output in my environment as shown in above comments . Please cross verify once & approve PR if OK.

@modassarrana89
Copy link
Author

@israel-hdez Please review the changes

@modassarrana89
Copy link
Author

@ckadner @israel-hdez @rafvasq Please review the change .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerfile is not multi-arch
4 participants