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

Update docker base images #8

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@
# limitations under the License.

# Using specific tag for now, there was some reason newer minio versions didn't work
FROM quay.io/cloudservices/minio:RELEASE.2021-06-17T00-10-46Z.hotfix.35a0912ff as minio-examples

EXPOSE 9000

FROM quay.io/minio/minio:RELEASE.2024-02-26T09-33-48Z as minio
ARG MODEL_DIR=/data1/modelmesh-example-models

USER root

RUN useradd -u 1000 -g 0 modelmesh
RUN mkdir -p ${MODEL_DIR}
RUN chown -R 1000:0 /data1 && \
chgrp -R 0 /data1 && \
chmod -R g=u /data1
ARG FVT_DIR=/data1/modelmesh-example-models/fvt
# API server
EXPOSE 9000
# Console Server
EXPOSE 9001

COPY --chown=1000:0 keras ${MODEL_DIR}/keras/
COPY --chown=1000:0 lightgbm ${MODEL_DIR}/lightgbm/
Expand All @@ -38,24 +33,14 @@ COPY --chown=1000:0 xgboost ${MODEL_DIR}/xgboost/
# some models are duplicated for testing and verification
COPY --chown=1000:0 tensorflow/mnist ${MODEL_DIR}/tensorflow/mnist.savedmodel/

USER 1000


# Image with additional models used in the FVTs
FROM minio-examples as minio-fvt

ARG FVT_DIR=/data1/modelmesh-example-models/fvt

USER root

COPY --chown=1000:0 fvt ${FVT_DIR}/

# some models are duplicated for FVT testing and verification
COPY --chown=1000:0 fvt ${FVT_DIR}/
COPY --chown=1000:0 keras ${FVT_DIR}/keras/
COPY --chown=1000:0 keras ${FVT_DIR}/tensorflow/keras-mnist/
COPY --chown=1000:0 keras ${FVT_DIR}/tensorflow/keras-mnistnew/
COPY --chown=1000:0 tensorflow/mnist ${FVT_DIR}/tensorflow/mnist.savedmodel/
COPY --chown=1000:0 tensorflow/mnist ${FVT_DIR}/tensorflow/mnist-dup.savedmodel/
COPY --chown=1000:0 fvt/pytorch/pytorch-mar ${FVT_DIR}/pytorch/pytorch-mar-dup/


USER 1000
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ Start a container with the name _"modelmesh-minio-examples"_:
docker run --rm --name "modelmesh-minio-examples" \
-u "1000" \
-p "9000:9000" \
-p "9001:9001" \
-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
${DOCKER_USER}/modelmesh-minio-examples:latest server /data1
${DOCKER_USER}/modelmesh-minio-examples:latest server /data1 --console-address ":9001"
```


Expand Down