@@ -34,15 +34,30 @@ Clone elasticdl repo for model zoo and some scripts.
3434git clone https://github.com/sql-machine-learning/elasticdl.git
3535```
3636
37+ ### Prepare the dataset
38+
39+ We generate MNIST training and evaluation data in RecordIO format. We provide a
40+ script in elasticdl repo.
41+
42+ ``` bash
43+ docker pull elasticdl/elasticdl:dev
44+ # Change directory to the root of elasticdl repo
45+ cd elasticdl
46+ mkdir data
47+ docker run --rm -it \
48+ -v $HOME /.keras/datasets:/root/.keras/datasets \
49+ -v $PWD :/work \
50+ -w /work elasticdl/elasticdl:dev \
51+ bash -c " scripts/gen_dataset.sh data"
52+ ```
53+
3754### Start Kubernetes Cluster
3855
3956We start minikube with a command-line option ` --mount-string ` , which mounts the
4057directory ` {elasticdl_repo_root}/data ` in local host to ` /data ` path in all
4158minikube containers.
4259
4360``` bash
44- cd elasticdl
45- mkdir data
4661minikube start --vm-driver=hyperkit --cpus 2 --memory 6144 --disk-size=50gb --mount=true --mount-string=" ./data:/data"
4762kubectl apply -f elasticdl/manifests/elasticdl-rbac.yaml
4863eval $( minikube docker-env)
@@ -59,22 +74,6 @@ elasticdl zoo build --image=elasticdl:mnist .
5974We use the model predefined in model zoo directory. The model definition will
6075be packed into the new Docker image ` elasticdl:mnist ` .
6176
62- ### Prepare the dataset
63-
64- We generate MNIST training and evaluation data in RecordIO format. We provide a
65- script in elasticdl repo.
66-
67- ``` bash
68- # Change directory to the root of elasticdl repo
69- cd ../
70- docker pull elasticdl/elasticdl:dev
71- docker run --rm -it \
72- -v $HOME /.keras/datasets:/root/.keras/datasets \
73- -v $PWD :/work \
74- -w /work elasticdl/elasticdl:dev \
75- bash -c " scripts/gen_dataset.sh data"
76- ```
77-
7877### Summit a training job
7978
8079We use the following command to submit a training job:
0 commit comments