Coder Social home page Coder Social logo

kasteph / clingo-notebook Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 26 KB

A Docker image with clingo and Jupyter installed. Write ASP with clingo quickly!

License: GNU General Public License v3.0

Dockerfile 100.00%
clingo potassco answer-set-programming docker

clingo-notebook's Introduction

clingo-notebook ๐Ÿ“’

A docker image with clingo, Jupyter, and conda installed.

But why make this notebook if clingo has conda as a dependency anyway? ๐Ÿค”

This is made for people who do not use conda primarily as their Python package manager (such as myself) or for software developers who do not use Python extensively but are probably serial docker users.

Installation

Install docker if you have not already.

With docker installed:

docker pull stephsamson/clingo

Quickstart

In your project workspace (such as ~/code/asp, for example), run:

docker run --rm -p 8888:8888 -v "$PWD":/home/jovyan/work stephsamson/clingo

A Jupyter notebook link will appear on your terminal; copy and paste this link onto your browser. Your project workspace will be under /work in the Jupyter notebook tree.

Before you run a cell in a Jupyter notebook, make sure that you have the following to run cell magic:

%%clingo -V0 0

... so it should look like this:

To enable verbose mode in cell magic, simply use the following cell magic:

%%clingo 0

And that's it! ๐Ÿ’ซ

No Notebook

If you don't need a notebook because you simply want to run the .lp file from your project workspace:

# assumes dir has .lp files
docker run --rm -it -v "$PWD":/home/jovyan/work --entrypoint=/bin/bash stephsamson/clingo

This will run an interactive bash shell and your work will be under the work directory.

More Options

This docker image is built on jupyter/docker-stacks so it is capable of accepting other options as written on their documentation.

clingo-notebook's People

Contributors

kasteph avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.