Giter VIP home page Giter VIP logo

jupyterlab-docker's Introduction

jupyterlab-docker

A simple template project for research projects. Contains a docker container for hosting a jupyterlab instance for development with the Python 2, Python 3, and Julia Kernels installed by default.

Also contains example project structure.

Requirements

  • Docker >= 18.04 (Though older versions will likely work)
  • Docker-Compose >= 3.6
  • Python 3.6 (or greater)

Package Installation

To install the python packages and run the code natively, run the following from the project root:

pip3 install -r requirements.txt

Pipenv Installation

It can be easier to use pipenv to install the dependencies in a virual environment.

First install pipenv:

pip3 install -U pipenv

Then create a virtual envrionment will the required dependencies:

pipenv --python 3.6 install -r requirements.txt

The virtual environment can then be activated with:

pipenv shell

Unit tests can then be run with:

pytest

And finally you can exit the virtual environment with:

exit

Jupyterlab Setup

First clone or download the repository to the location of your choice. You can build the docker image from this directory using the command:

docker-compose build

Jupyterlab Usage

After having built the image, simply start the jupyterlab server using:

docker-compose up

Now you can point your browser of choice to localhost:9001 to view the notebook.

Running Unit Tests

If you write unit tests for your libraries and code (if you do you're a person of exceeding quality and taste), you can place them all in the tests folder in the project.

To run the tests simply type:

pytest

To run the same tests with a test coverage report

pytest --cov=lib

Known Issues

The IJulia kernel is not installed by default, though Julia 1.0 is. The IJulia kernel can be installed using the following steps:

  1. Start the jupyterlab server
  2. Open a terminal session in jupyter lab and type: julia
  3. Enter the juila package environment by typing: ]
  4. Install the IJulia kernel with: add IJulia
  5. Exit the Julia package manager by hitting backspace
  6. Exit the Julia REPL by entering exit()
  7. Refersh the webpage and Julia will now be a notebook option.

jupyterlab-docker's People

Contributors

duncaneddy avatar

Watchers

James Cloos avatar Kyle Brown 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.