diff --git a/Dockerfile b/Dockerfile index 72e2b04..6d116fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,70 +1,27 @@ FROM ubuntu:xenial -MAINTAINER Sebastian Gutsche +MAINTAINER The OSCAR team RUN apt-get update -qq \ && apt-get install -y \ - 4ti2 \ - ant \ - ant-optional \ autoconf \ - autogen \ - bliss \ build-essential \ bzip2 \ - clang \ cmake \ curl \ debhelper \ - default-jdk \ - gfortran \ git \ - graphviz \ - language-pack-el-base \ - language-pack-en \ - libbliss-dev \ - libboost-dev \ - libboost-python-dev \ - libcdd-dev \ - libcdd0d \ - libdatetime-perl \ - libflint-dev \ - libglpk-dev \ + libcurl4-gnutls-dev \ + libczmq-dev \ libgmp-dev \ - libgmp10 \ - libgmpxx4ldbl \ - libjson-perl \ - libmpfr-dev \ - libncurses5-dev \ - libnormaliz-dev \ - libntl-dev \ - libperl-dev \ - libppl-dev \ libreadline6-dev \ - libsvn-perl \ - libterm-readkey-perl \ - libterm-readline-gnu-perl \ libtool \ - libxml-libxml-perl \ - libxml-libxslt-perl \ - libxml-perl \ - libxml-writer-perl \ - libxml2-dev \ - libxslt-dev \ - libzmq3-dev \ m4 \ make \ - nano \ - ninja-build \ - patch \ - pkg-config \ - python-dev \ + python3-dev \ python3-pip \ sudo \ - unzip \ - vim \ wget \ - xsltproc \ zlib1g-dev RUN adduser --quiet --shell /bin/bash --gecos "OSCAR user,101,," --disabled-password oscar \ @@ -85,46 +42,35 @@ RUN mkdir .jupyter \ ### Install Julia -ENV JULIA_VERSION julia-1.1.0 +ENV JULIA_VERSION julia-1.3.1 -RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.1/${JULIA_VERSION}-linux-x86_64.tar.gz \ +RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.3/${JULIA_VERSION}-linux-x86_64.tar.gz \ && tar xf ${JULIA_VERSION}-linux-x86_64.tar.gz \ && rm ${JULIA_VERSION}-linux-x86_64.tar.gz \ && sudo ln -snf /home/oscar/${JULIA_VERSION}/bin/julia /usr/local/bin/julia -### Install GAP & related - -RUN wget -q https://github.com/gap-system/gap/archive/master.zip \ - && unzip -q master.zip \ - && rm master.zip \ - && cd gap-master \ - && ./autogen.sh \ - && ./configure --with-julia=/home/oscar/${JULIA_VERSION} --with-gc=julia \ - && make \ - && make bootstrap-pkg-full \ - && cd pkg \ - && ../bin/BuildPackages.sh \ - && sudo ln -snf /home/oscar/gap-master/gap /usr/local/bin/gap - -RUN cd /home/oscar/gap-master/pkg \ - && git clone https://github.com/gap-packages/JupyterKernel.git \ - && cd JupyterKernel \ - && python3 setup.py install --user +### Install Julia packages -ENV PATH /home/oscar/gap-master/pkg/JupyterKernel/bin:${PATH} -ENV JUPYTER_GAP_EXECUTABLE /home/oscar/.julia/gap.sh -ENV GAPROOT /home/oscar/gap-master +RUN julia -e 'import Pkg; Pkg.add( "IJulia" )' +RUN julia -e 'import Pkg; Pkg.add( "AbstractAlgebra" )' +RUN julia -e 'import Pkg; Pkg.add( "Nemo" )' +RUN julia -e 'import Pkg; Pkg.add( "Polymake" )' +RUN julia -e 'import Pkg; Pkg.add( "Singular" )' +RUN julia -e 'import Pkg; Pkg.add( "GAP" )' +RUN julia -e 'import Pkg; Pkg.add( "Hecke" )' +RUN julia -e 'import Pkg; Pkg.add(Pkg.PackageSpec(url="https://github.com/oscar-system/OSCAR.jl", rev="master"))' +COPY Examples Examples -RUN julia -e "import Pkg; Pkg.add( \"IJulia\" )" -RUN julia -e "import Pkg; Pkg.add( \"CxxWrap\" )" -RUN julia -e "import Pkg; Pkg.add( \"AbstractAlgebra\" )" -RUN julia -e "import Pkg; Pkg.add( \"Nemo\" )" -RUN julia -e "import Pkg; Pkg.add( \"Polymake\" )" -RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/oscar-system/Singular.jl\", rev=\"master\" ))" -RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/oscar-system/GAP.jl\", rev=\"master\" ))" -RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/oscar-system/OSCAR.jl\", rev=\"master\" ))" -RUN julia -e "import Pkg; Pkg.add(Pkg.PackageSpec(url=\"https://github.com/thofma/Hecke.jl\", rev=\"master\" ))" +# TODO/FIXME: setup GAP package JupyterKernel -COPY Examples Examples +RUN ln -s $(julia -e 'print(abspath(joinpath(dirname(Base.find_package("GAP")), "..", "gap")))') /home/oscar/gap +RUN cd /home/oscar/gap/pkg \ + && git clone https://github.com/gap-packages/JupyterKernel.git \ + && cd JupyterKernel \ + && python3 setup.py install --user + +ENV PATH /home/oscar/gap/pkg/JupyterKernel/bin:${PATH} +ENV JUPYTER_GAP_EXECUTABLE /home/oscar/.julia/gap.sh +ENV GAPROOT /home/oscar/gap diff --git a/Readme.md b/Readme.md index 4427398..8f9dcf1 100644 --- a/Readme.md +++ b/Readme.md @@ -19,25 +19,20 @@ Furthermore Jupyter and the Julia Kernel for Jupyter is installed. ## Usage To start Julia in the Docker image, execute -``` -docker run -it oscarsystem/oscardocker:latest -``` + + docker run -it oscarsystem/oscardocker:latest + You can then start julia via the command -``` -julia -``` + + julia + and load Singular.jl via -``` -using Cxx -using Singular -``` + + using Singular + or Polymake.jl via -``` -using Cxx -using Polymake -``` -Please note that for Polymake and Singular to work you need to execute `using Cxx` first. This is due to current portability issues. + using Polymake For an examples see [here](https://nbviewer.jupyter.org/github/oscar-system/OSCARBinder/blob/master/Singular.ipynb) for Singular and [here](https://nbviewer.jupyter.org/github/oscar-system/OSCARBinder/blob/master/g-vectors_of_random_simplicial_6-polytopes.ipynb) for Polymake. @@ -45,15 +40,15 @@ for Polymake. ## Usage of Jupyter To start a Jupyter Notebook server, execute the image with -``` -docker run -it --net="host" oscarsystem/oscardocker:latest -``` + + docker run -it --net="host" oscarsystem/oscardocker:latest + and after the container started, execute -``` -jupyter notebook --no-browser -``` + + jupyter notebook --no-browser + inside the container. Then open the URL displayed in your terminal. ## Usage on [mybinder.org](http://mybinder.org) -You can use this Docker image as base for your Binder docker repository. See [here](https://github.com/sebasguts/OSCARBinder) for an example. Please note that the versions are tagged by date. \ No newline at end of file +You can use this Docker image as base for your Binder docker repository. See [here](https://github.com/oscar-system/OSCARBinder) for an example. Please note that the versions are tagged by date. \ No newline at end of file