Git Product home page Git Product logo

jupyter-mathematica's Introduction

What is jupyter-mathematica?

An image built off of jupyter/base-notebook that includes the free Wolfram Engine for developers.

How to get started

docker build -t jupyter-mathematica .

docker run -p 8888:8888 jupyter-mathematica

Then inside the container, run wolframscript and login with your Wolfram username and password or get a free license here. You can easily do this from within a shell in Jupyter. After you are logged in, run

$PasswordFile // FilePrint

in the wolframscript session to get your license key. Create an empty directory somewhere on your host system named license. Copy and paste the output from the wolframscript command into a file named mathpass within that directory. We will mount this directory into the container when starting it from now on. Example:

docker run -p 8888:8888 \
-v /home/$USER/jm-files/license:/usr/local/Wolfram/WolframEngine/12.1/Configuration/Licensing \
jupyter-mathematica

Now, we need to tell Jupyter about mathematica. Run the following commands in the container.

cd /home/jovyan/wolfram/WolframLanguageForJupyter
./configure-jupyter.wls add
jupyter-kernelspec list

The command jupyter-kernelspec list should tell you which kernels are available, make sure you see the kernel we just added in the output. Now, you should be able to start a Wolfram Language notebook. Keep in mind that any notebooks you create will be stored in temporary docker volumes. Consider bind mounting some local directory like this:

docker run -p 8888:8888 -v /home/$USER/jm-files/work:/home/jovyan/work jupyter-mathematica

Full example mounting license file and work directory:

docker run -p 8888:8888 -v /home/$USER/jm-files/work:/home/jovyan/work \
-v /home/$USER/jm-files/license:/usr/local/Wolfram/WolframEngine/12.1/Configuration/Licensing \
jupyter-mathematica

If the WolframLanguage Kernel doesn't appear, you may have to re-run configure-jupyter.wls add and then jupyter-kernelspec list. I have experienced this behavior periodically and when restarting the container. After running this command, wait a few secodns and the kernel should appear.

jupyter-mathematica's People

Contributors

davecwright3 avatar spwhitt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.