File tree Expand file tree Collapse file tree 2 files changed +34
-5
lines changed
Expand file tree Collapse file tree 2 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sb
44
55script_cmd=" ${ENTRYPOINT_COMMAND:- $(basename $0 )} "
66
7- function help() {
7+ function help {
88 cat << EOF
99
1010Usage:
1919 mathics src = /usr/src/app/mathics
2020 --pythonpath /usr/src/app
2121
22- -m | --mode {cli|ui|gui|minimal} Start mathics in web-ui mode (ui or gui), cli mode (cli) or minimal. Default is cli.
22+ -m | --mode {cli|ui|gui|minimal|pdf}
23+ Start mathics in either:
24+ * web-ui mode (ui or gui),
25+ * cli mode (cli) or minimal.
26+ * viewing manual (pdf) or document
27+ Default is cli.
2328 See: https://github.com/mathics/Mathics/wiki/Installing#running-mathics
2429
2530Params:
4348
4449case $mathics_mode in
4550 cli) mathicsscript $@
46- ;;
51+ ;;
4752 minimal|mathics)
48- mathics $@
49- ;;
53+ mathics $@
54+ ;;
55+ document|pdf)
56+ evince /usr/src/app/Mathics/mathics/doc/tex/mathics.pdf
57+ ;;
5058 ui|gui)
5159 echo
5260 echo " ~~~~ app/data has been mounted to $MATHICS_HOME /data ~~~~"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [ -n " $DEBUG " ]; then
3+ set -x
4+ fi
5+
6+ # Allow customization using POSIX environment variables:
7+ DOCKER=${DOCKER:- docker}
8+
9+ TAG=${TAG:- latest}
10+ MATHICS_IMAGE=${MATHICS_IMAGE:- mathicsorg/ mathics: ${TAG} }
11+
12+ $DOCKER run -it \
13+ --name mathics-web \
14+ --rm \
15+ --env=" DISPLAY" \
16+ --workdir=/app \
17+ --volume=" $PWD " :/app \
18+ --volume=" /tmp/.X11-unix:/tmp/.X11-unix:rw" \
19+ --volume=" /tmp:/usr/src/app/data" \
20+ $MATHICS_IMAGE \
21+ --mode pdf -- $@
You can’t perform that action at this time.
0 commit comments