Git Product home page Git Product logo

publicnotebooks's Introduction

README

Python Flask application to list jupyter notebooks file in the user home directory.

DEVELOPMENT

Install

Ubuntu Dependencies:

sudo apt install python3-venv

or

sudo apt install python-virtualenv

Install the requirements with pip in the virtual environment

virtualenv venv
# or python3 -m venv venv 
source venv/bin/activate
pip install -r requirements.txt

Adjust the 'config.py' file to your needs.

Run

To run it on localhost:5000

source venv/bin/activate
python run.py

DEPLOYMENT

Configuration

Application

cp config-example.py config.py
# Modify the config file accordingly with your environment

Nginx configuration

This is an example on how to configure nginx to serve both static jupyter notebooks files and our pages. This examples assumes an url such as https://www.example.org/public_notebooks/username

location ~ ^/public_notebooks/([a-zA-Z0-9\-_.]*)((/.*)?.ipynb)$ {
  alias /home/$1/public_notebooks$2;
}
location ~ ^/public_notebooks/([a-zA-Z0-9\-_.]*)(/)?$ {
  alias /home/$1/public_notebooks$2;
  include uwsgi_params;
  uwsgi_pass unix:/var/run/publicNotebooks.sock;
}

Systemd

# Modify the unit file accordingly with you environment
# symlink it to /etc/systemd/system/publicNotebooks.service 
ln -s /opt/publicNotebooks/publicNotebooks.service /etc/systemd/system/publicNotebooks.service

publicnotebooks's People

Contributors

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