Skip to content

Instantly share code, notes, and snippets.

@theone4ever
Last active February 3, 2019 15:14
Show Gist options
  • Select an option

  • Save theone4ever/230dff45a01a8ecc7dd331f84d3cafc9 to your computer and use it in GitHub Desktop.

Select an option

Save theone4ever/230dff45a01a8ecc7dd331f84d3cafc9 to your computer and use it in GitHub Desktop.

Revisions

  1. theone4ever revised this gist Feb 3, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions jupyter.service
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ Type=simple
    PIDFile=/run/jupyter.pid
    # Step 1 and Step 2 details are here..
    # ------------------------------------
    #Note: `workon tf` is to switch to tf virtualenv where i have jupyter installed
    ExecStart=/bin/bash -c 'cd /home/keven/notebooks && source /home/keven/.profile && workon tf && jupyter notebook'
    User=keven
    Group=keven
  2. theone4ever created this gist Feb 3, 2019.
    18 changes: 18 additions & 0 deletions jupyter.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    [Unit]
    Description=Jupyter Notebook

    [Service]
    Type=simple
    PIDFile=/run/jupyter.pid
    # Step 1 and Step 2 details are here..
    # ------------------------------------
    ExecStart=/bin/bash -c 'cd /home/keven/notebooks && source /home/keven/.profile && workon tf && jupyter notebook'
    User=keven
    Group=keven
    WorkingDirectory=/home/keven/notebooks
    Restart=always
    RestartSec=10
    #KillMode=mixed

    [Install]
    WantedBy=multi-user.target