Skip to content

Commit

Permalink
[MXNET-1093] Add python3 Docker images for each MXNet release (apache…
Browse files Browse the repository at this point in the history
…#12791)

* Add dockerfiles for python3

* Fix

* Fix the dockerfile names

* Update the README with python3 images

* Parameterize the mxnet version

* Fix typo

* Reduce the number of docker layers

* Combine build and Test, run builds in parallel. Use variable names instead of numbers

* minor fix

* Update README for build command

* Bug Fix: Script should fail if any background process returns non-zero code

* Changes needed for Benchmarking, 4 new tags, change python to python-dev

* Minor typos

* Minor Rearrangement - sometimes tagging fails

* Move error checking to a method

* Push BAI images to dockerhub

* Create ~/temp dir

* Bug Fix

* Fix merge issues

I don't know if this is tha main merge issue the PR is complaining about on mxnet, but maybe it will help
  • Loading branch information
mbaijal authored and vdantu committed Mar 31, 2019
1 parent da7d94f commit 8f9c21e
Show file tree
Hide file tree
Showing 18 changed files with 446 additions and 110 deletions.
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for CPU

FROM ubuntu:16.04
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet
RUN pip install mxnet==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.cpu.mkl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet CPU with MKL

FROM ubuntu:16.04
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-mkl
RUN pip install mxnet-mkl==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.gpu.cu80
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for GPU

FROM nvidia/cuda:8.0-cudnn5-devel
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-cu80
RUN pip install mxnet-cu80==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.gpu.cu80.mkl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for GPU with MKL

FROM nvidia/cuda:8.0-cudnn5-devel
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-cu80mkl
RUN pip install mxnet-cu80mkl==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.gpu.cu90
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for GPU

FROM nvidia/cuda:9.0-cudnn7-devel
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-cu90
RUN pip install mxnet-cu90==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.gpu.cu90.mkl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for GPU with MKL

FROM nvidia/cuda:9.0-cudnn7-devel
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-cu90mkl
RUN pip install mxnet-cu90mkl==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.gpu.cu92
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for GPU

FROM nvidia/cuda:9.2-cudnn7-devel
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-cu92
RUN pip install mxnet-cu92==$version
11 changes: 6 additions & 5 deletions docker/docker-python/Dockerfile.mxnet.python.gpu.cu92.mkl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
# Dockerfile to build MXNet for GPU with MKL

FROM nvidia/cuda:9.2-cudnn7-devel
ARG version

RUN apt-get update
RUN apt-get install -y wget python gcc
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN apt-get update && \
apt-get install -y wget python-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py

RUN pip install mxnet-cu92mkl
RUN pip install mxnet-cu92mkl==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for CPU

FROM ubuntu:16.04
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.cpu.mkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet CPU with MKL

FROM ubuntu:16.04
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-mkl==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.gpu.cu80
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for GPU

FROM nvidia/cuda:8.0-cudnn5-devel
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-cu80==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.gpu.cu80.mkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for GPU with MKL

FROM nvidia/cuda:8.0-cudnn5-devel
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-cu80mkl==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.gpu.cu90
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for GPU

FROM nvidia/cuda:9.0-cudnn7-devel
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-cu90==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.gpu.cu90.mkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for GPU with MKL

FROM nvidia/cuda:9.0-cudnn7-devel
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-cu90mkl==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.gpu.cu92
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for GPU

FROM nvidia/cuda:9.2-cudnn7-devel
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-cu92==$version
29 changes: 29 additions & 0 deletions docker/docker-python/Dockerfile.mxnet.python3.gpu.cu92.mkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- 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 to build MXNet for GPU with MKL

FROM nvidia/cuda:9.2-cudnn7-devel
ARG version

RUN apt-get update && \
apt-get install -y wget python3-dev gcc && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py

RUN pip3 install mxnet-cu92mkl==$version
Loading

0 comments on commit 8f9c21e

Please sign in to comment.