Giter Club home page Giter Club logo

docker-coconut's Introduction

Project

Docker project for a typical Coconut environment, including support for Jupyter Notebook.

Docker Pulls Docker Automated Build Docker Build Status Layers Version Tag

Coconut

Coconut is a functional programming language that compiles to Python. Since all valid Python is valid Coconut, using Coconut will only extend and enhance what you're already capable of in Python.

For more details about Coconut, visit the following pages:

Pull Coconut Image

$ docker pull andreburgaud/coconut

Run a Coconut shell

$ docker run -it --rm andreburgaud/coconut
Coconut Interpreter:
(type 'exit()' or press Ctrl-D to end)
>>> exit()

Run Coconut shell with specific options

  • --target 3.8: support for the latest Python 3.8 syntax such as assignment expression :=.
$ docker run --rm -it andreburgaud/coconut coconut --target 3.8
Coconut Interpreter:
(type 'exit()' or press Ctrl-D to end)
>>> import sys
>>> from coconut import root
>>> f'Coconut {root.VERSION_STR}' |> print
Coconut 1.4.3 [Ernest Scribbler]
>>> 'Python {}.{}.{}'.format(*sys.version_info[:3]) |> print
Python 3.8.2
>>> exit()

Start Jupyter notebook

Notebooks will appears in the host current directory (/notebooks in the container)

$ docker run -it --rm -v`pwd`:/notebooks -p 8888:8888 andreburgaud/coconut coconut --target 3.8 --jupyter notebook --ip 0.0.0.0 --no-browser
Coconut: Successfully installed Coconut Jupyter kernel.
[I 04:37:23.521 NotebookApp] Writing notebook server cookie secret to /home/jupyter/.local/share/jupyter/runtime/notebook_cookie_secret
[I 04:37:23.730 NotebookApp] Serving notebooks from local directory: /notebooks
[I 04:37:23.730 NotebookApp] The Jupyter Notebook is running at:
[I 04:37:23.730 NotebookApp] http://(473a153c8d00 or 127.0.0.1):8888/?token=5d03ad7258d6f720c42c5ecab33d62c77693a69ff0ebe434
[I 04:37:23.731 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 04:37:23.734 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///home/jupyter/.local/share/jupyter/runtime/nbserver-28-open.html
    Or copy and paste one of these URLs:
        http://(473a153c8d00 or 127.0.0.1):8888/?token=5d03ad7258d6f720c42c5ecab33d62c77693a69ff0ebe434

From the output of the example above, open the host browser with the following URL:

http://127.0.0.1:8888/?token=5d03ad7258d6f720c42c5ecab33d62c77693a69ff0ebe434

Start the default container shell

$ docker run -it --rm andreburgaud/coconut sh
/notebooks $

docker-coconut's People

Contributors

andreburgaud avatar

Watchers

 avatar  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.