kubeflow / mxnet-operator

A Kubernetes operator for mxnet jobs
Apache License 2.0
53 stars 34 forks source link

Failed to build container image in examples #67

Closed Jeffwan closed 4 years ago

Jeffwan commented 4 years ago

Docker image doesn't work. It's probably because of base image change. https://github.com/kubeflow/mxnet-operator/blob/master/examples/v1beta1/train/Dockerfile

$ docker build -t myusername/mxnet:gpu .
Sending build context to Docker daemon  8.192kB
Step 1/10 : FROM mxnet/python:gpu
 ---> 31528c92407c
Step 2/10 : RUN apt-get update     && apt-get install -y git     && apt-get install -y build-essential git     && apt-get install -y libopenblas-dev liblapack-dev     && apt-get install -y libopencv-dev
 ---> Using cache
 ---> c7e42befb56d
Step 3/10 : RUN rm -rf /mxnet     && git clone --recursive https://github.com/apache/incubator-mxnet.git -b v1.2.0
 ---> Running in a2275a3a24eb
fatal: could not create work tree dir 'incubator-mxnet': No such file or directory
The command '/bin/sh -c rm -rf /mxnet     && git clone --recursive https://github.com/apache/incubator-mxnet.git -b v1.2.0' returned a non-zero code: 128

It actually fetch image to root disk / which is not best practice. We can add WORKDIR and point to somewhere.

Jeffwan commented 4 years ago

This has been addressed.