@@ -34,15 +34,30 @@ Clone elasticdl repo for model zoo and some scripts.
34
34
git clone https://github.com/sql-machine-learning/elasticdl.git
35
35
```
36
36
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
+
37
54
### Start Kubernetes Cluster
38
55
39
56
We start minikube with a command-line option ` --mount-string ` , which mounts the
40
57
directory ` {elasticdl_repo_root}/data ` in local host to ` /data ` path in all
41
58
minikube containers.
42
59
43
60
``` bash
44
- cd elasticdl
45
- mkdir data
46
61
minikube start --vm-driver=hyperkit --cpus 2 --memory 6144 --disk-size=50gb --mount=true --mount-string=" ./data:/data"
47
62
kubectl apply -f elasticdl/manifests/elasticdl-rbac.yaml
48
63
eval $( minikube docker-env)
@@ -59,22 +74,6 @@ elasticdl zoo build --image=elasticdl:mnist .
59
74
We use the model predefined in model zoo directory. The model definition will
60
75
be packed into the new Docker image ` elasticdl:mnist ` .
61
76
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
-
78
77
### Summit a training job
79
78
80
79
We use the following command to submit a training job:
0 commit comments