-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
61 lines (46 loc) · 2.17 KB
/
Dockerfile
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
# Copyright 2023 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Using specific tag to avoid newer minio versions that don't currently work
FROM docker.io/minio/minio:RELEASE.2021-06-17T00-10-46Z.hotfix.35a0912ff as minio-examples
EXPOSE 9000
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
COPY --chown=1000:0 keras ${MODEL_DIR}/keras/
COPY --chown=1000:0 lightgbm ${MODEL_DIR}/lightgbm/
COPY --chown=1000:0 onnx ${MODEL_DIR}/onnx/
COPY --chown=1000:0 pytorch ${MODEL_DIR}/pytorch/
COPY --chown=1000:0 sklearn ${MODEL_DIR}/sklearn/
COPY --chown=1000:0 tensorflow ${MODEL_DIR}/tensorflow/
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 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