Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "nitro run" command #5

Closed
lo5 opened this issue May 29, 2022 · 1 comment
Closed

Implement "nitro run" command #5

lo5 opened this issue May 29, 2022 · 1 comment
Assignees
Labels
type/feature Feature request

Comments

@lo5
Copy link
Member

lo5 commented May 29, 2022

Goal
Execute apps locally given one of:

  • nitro run foo.py
  • nitro run https://gist.github.com/user/hash

Notes
The deps for the app are self-contained in the .py file using a shebang-meets-dockerfile thingy:

# --- env ---
# USE venv
# RUN pip install pandas bokeh flask h2o-nitro
# RUN FLASK_APP=app.py flask run
# --- !env ---
def main():
    pass

or

# --- env ---
# USE venv
# FILE requirements.txt EOF
# pandas==4.5
# bokeh>=0.4.2
# flask
# h2o-nitro>0.8.2
# EOF
# RUN pip install -r requirements.txt
# RUN FLASK_APP=app.py flask run
# --- !env ---
def main():
    pass

Supported commands are

  • USE uses venv, conda, poetry, pipenv, etc.
  • FILE creates a file relative to cwd.
  • RUN executes a shell command.
  • GET fetches a file given a relative or absolute URL.
  • COPY copies, moves, renames local files.
@lo5 lo5 added the type/feature Feature request label May 29, 2022
@lo5 lo5 self-assigned this May 29, 2022
lo5 added a commit that referenced this issue Jun 4, 2022
lo5 added a commit that referenced this issue Jun 5, 2022
lo5 added a commit that referenced this issue Jun 5, 2022
lo5 added a commit that referenced this issue Jun 5, 2022
lo5 added a commit that referenced this issue Jun 6, 2022
lo5 added a commit that referenced this issue Jun 6, 2022
lo5 added a commit that referenced this issue Jun 7, 2022
lo5 added a commit that referenced this issue Jun 7, 2022
lo5 added a commit that referenced this issue Jun 8, 2022
lo5 added a commit that referenced this issue Jun 8, 2022
lo5 added a commit that referenced this issue Jun 8, 2022
lo5 added a commit that referenced this issue Jun 9, 2022
@lo5
Copy link
Member Author

lo5 commented Jun 9, 2022

@lo5 lo5 closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Feature request
Projects
None yet
Development

No branches or pull requests

1 participant