File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ ADD launch.sh /
2626
2727ENV GIT_REPO https://github.com/satyamz/ml-playground.git
2828
29-
3029EXPOSE 8888
3130
3231ENTRYPOINT [ "/usr/bin/tini" , "--" ]
Original file line number Diff line number Diff line change @@ -16,3 +16,19 @@ docker pull satyamz/docker-jupyter:v0.4
1616```
1717docker run -e GIT_REPO=github/repo/url/to/notebooks.git -p 8888:8888 satyamz/docker-jupyter:v0.4
1818```
19+
20+ ### Optional environment variables required
21+
22+ ```
23+ # Github handle
24+ GITHUB_USERNAME
25+
26+ # User name to set in git config
27+ USER_NAME
28+
29+ # User email address
30+ USER_EMAIL
31+
32+ #Github personal access token
33+ GITHUB_TOKEN
34+ ```
Original file line number Diff line number Diff line change @@ -19,6 +19,25 @@ $ vagrant ssh kubemaster-01
1919
2020Once logged in to kubemaster-01
2121
22+ #### Set following environment variable in openebs-ds.yaml
23+
24+
25+ ```
26+ # Github handle
27+ GITHUB_USERNAME
28+
29+ # User name to set in git config
30+ USER_NAME
31+
32+ # User email address
33+ USER_EMAIL
34+
35+ #Github personal access token
36+ GITHUB_TOKEN
37+ ```
38+
39+
40+
2241### Create pods
2342
2443```
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1beta1
2+ kind : Deployment
3+ metadata :
4+ name : jupyter-server
5+ namespace : default
6+ spec :
7+ replicas : 1
8+ template :
9+ metadata :
10+ labels :
11+ name : jupyter-server
12+ spec :
13+ containers :
14+ - name : jupyter-server
15+ imagePullPolicy : Always
16+ image : satyamz/docker-jupyter:v0.4
17+ ports :
18+ - containerPort : 8888
19+ env :
20+ - name : GIT_REPO
21+ value : https://github.com/vharsh/plot-demo.git
22+ - name : GITHUB_USERNAME
23+ value : " your-username"
24+ - name : USER_NAME
25+ value : " Your Name"
26+ - name : USER_EMAIL
27+ value : " you@mail.com"
28+ - name : GITHUB_TOKEN
29+ value : " GithubPersonalAccessToken"
30+ volumeMounts :
31+ - name : data-vol
32+ mountPath : /mnt/data
33+ volumes :
34+ - name : data-vol
35+ persistentVolumeClaim :
36+ claimName : jupyter-data-vol-claim
37+ ---
38+ kind : PersistentVolumeClaim
39+ apiVersion : v1
40+ metadata :
41+ name : jupyter-data-vol-claim
42+ spec :
43+ storageClassName : openebs-jupyter
44+ accessModes :
45+ - ReadWriteOnce
46+ resources :
47+ requests :
48+ storage : 5G
49+ ---
150apiVersion : v1
2- kind : Pod
51+ kind : Service
352metadata :
4- name : openebs-ds-pod
5-
53+ name : jupyter-service
654spec :
7- hostNetwork : true
8-
9- containers :
10- - image : satyamz/docker-jupyter:v0.4
11- name : docker-jupyter
12- env :
13- - name : GIT_REPO
14- value : https://github.com/vharsh/plot-demo.git
15- ports :
16- - containerPort : 8888
17- hostPort : 8888
18- volumeMounts :
19- - name : shared-data
20- mountPath : /mnt/data
21-
22- volumes :
23- - name : shared-data
24- hostPath :
25- path : /data
55+ ports :
56+ - name : ui
57+ port : 8888
58+ nodePort : 32424
59+ protocol : TCP
60+ selector :
61+ name : jupyter-server
62+ sessionAffinity : None
63+ type : NodePort
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- echo " Fetching notebooks from" $GIT_REPO
3+ echo " Fetching notebooks from" $GIT_REPO
44
55git clone $GIT_REPO /home/notebooks
66
You can’t perform that action at this time.
0 commit comments