File tree Expand file tree Collapse file tree 5 files changed +21
-7
lines changed
Expand file tree Collapse file tree 5 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ RUN apt-get update
1313RUN apt-get install -qq apt-utils
1414# we need libsqlite3-dev now if ubuntu doesn't come with that, we'll need
1515# to build our own Python
16- RUN apt-get install -qq liblapack-dev llvm-dev gfortran maria
16+ RUN apt-get install -qq liblapack-dev llvm-dev gfortran maria sqlite3
1717RUN pip install --no-cache-dir -r requirements.txt
1818COPY requirements-mathicsscript.txt ./
1919RUN pip install --no-cache-dir -r requirements-mathicsscript.txt
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ RUN apt-get update
1313RUN apt-get install -qq apt-utils
1414# we need libsqlite3-dev now if ubuntu doesn't come with that, we'll need
1515# to build our own Python
16- RUN apt-get install -qq liblapack-dev llvm-dev gfortran maria
16+ RUN apt-get install -qq liblapack-dev llvm-dev gfortran maria sqlite3
1717RUN pip install --no-cache-dir -r requirements.txt
1818COPY requirements-mathicsscript.txt ./
1919RUN pip install --no-cache-dir -r requirements-mathicsscript.txt
Original file line number Diff line number Diff line change 4343
4444echo
4545echo " ~~~~ app/data has been mounted to $MATHICS_HOME /data ~~~~"
46- echo " $ ls $MATHICS_HOME /data"
47- ls -p $MATHICS_HOME /data
46+ if [[ -n $MATHICS_DJANGO_DB_PATH ]]; then
47+ echo " ~~~~ SQLite data (worksheets, user info) will be stored in $MATHICS_DJANGO_DB_PATH ~~~~"
48+ else
49+ echo " ~~~~ SQLite data (worksheets, user info) will be stored in $MATHICS_HOME /data/mathics.sqlite"
50+ fi
4851echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
4952echo
5053
5154case $mathics_mode in
52- cli) mathicsscript $@ ;;
53- minimal|mathics) mathics $@ ;;
54- ui|gui) mathicsserver -e $@ ;;
55+ cli) mathicsscript
56+ $@
57+ ;;
58+ minimal|mathics)
59+ mathics $@
60+ ;;
61+ ui|gui)
62+ mathicsserver -e $@ ;;
5563 shell) /bin/bash ;;
5664 * ) echo " unknown mathics_mode=$mathics_mode . See '$script_cmd --help'" ; exit 2 ;;
5765esac
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -x
3+
4+ # Allow customization using POSIX environment variables:
35DOCKER=${DOCKER:- docker}
6+ MATHICS_DJANGO_DB=${MATHICS_DJANGO_DB:- " mathics.sqlite" }
7+ MATHICS_DJANGO_DB_PATH=${MATHICS_DJANGO_DB_PATH:- DOCKER=/ usr/ src/ app/ data mathicsorg/ mathics/ ${MATHICS_DJANGO_DB_PATH} }
8+
49$DOCKER run -it \
510 --name mathics-web \
611 --rm \
712 --env=" DISPLAY" \
13+ --env=" MATHICS_DJANGO_DB_PATH=$MATHICS_DJANGO_DB_PATH " \
814 --workdir=/app \
915 --volume=" $PWD " :/app \
1016 --volume=" /tmp/.X11-unix:/tmp/.X11-unix:rw" \
You can’t perform that action at this time.
0 commit comments