| # -*- mode: dockerfile -*- |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you 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. |
| # |
| # |
| # Dockerfile for CentOS 7 based builds. |
| # Via the CentOS 7 Dockerfiles, we ensure MXNet continues to run fine on older systems. |
| # |
| # See docker-compose.yml for supported BASE_IMAGE ARGs and targets. |
| |
| #################################################################################################### |
| # The Dockerfile uses a dynamic BASE_IMAGE (for example centos:7, |
| # nvidia/cuda:10.2-cudnn7-devel-centos7 etc). |
| # On top of BASE_IMAGE we install all dependencies shared by all MXNet build |
| # environments into a "base" target. At the end of this file, we specialize |
| # "base" for specific usecases. The target built by docker can be selected via |
| # "--target" option or docker-compose.yml |
| #################################################################################################### |
| ARG BASE_IMAGE |
| FROM $BASE_IMAGE AS base |
| |
| WORKDIR /work/deps |
| |
| COPY install/centos7_core.sh /work/ |
| RUN /work/centos7_core.sh |
| COPY install/centos7_ccache.sh /work/ |
| RUN /work/centos7_ccache.sh |
| COPY install/centos7_python.sh /work/ |
| RUN /work/centos7_python.sh |
| COPY install/centos7_scala.sh /work/ |
| RUN /work/centos7_scala.sh |
| |
| ARG USER_ID=0 |
| COPY install/centos7_adduser.sh /work/ |
| RUN /work/centos7_adduser.sh |
| |
| ENV PYTHONPATH=./python/ |
| WORKDIR /work/mxnet |
| |
| COPY runtime_functions.sh /work/ |
| |