-
Notifications
You must be signed in to change notification settings - Fork 2
/
dockerMe
executable file
·45 lines (39 loc) · 1.16 KB
/
dockerMe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
purge=0
for i in "$@"
do
case $i in
-p|--purge)
purge=1
shift # past argument=value
;;
--help)
echo "${0}: [-p|--purge]"
echo "-p|--purge : purge any cache of the git file"
echo " eg when the git has been updated"
echo " and you want to force a re-read"
exit 0
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
# need to delete binder
rm -f binder/*
docker login
# get the id for the git clone command
echo "first, try a build"
if [ $purge -eq 1 ]; then
echo "purge: $purge"
docker system prune -fa
fi
# --no-run
jupyter-repo2docker --no-run --push --user-name ucl_msc --image-name proflewis/uclgeog https://github.com/UCL-EO/uclgeog_core
# redundant
#docker build --rm -t jupyter/uclgeog docker
#docker tag jupyter/uclgeog proflewis/uclgeog
#docker run -u 0 -w /home/ucl_msc/uclgeog_core -it proflewis/geog0111:latest bash -c "conda update conda conda-build --yes"
#docker push proflewis/uclgeog
#docker run -u 0 -it --rm -p 8888:8888 proflewis/geog0111:latest bash -c "cd uclgeog_core && python setup.py install && bash postBuild && conda activate uclgeog_core"