Skip to content

Paperspace/FastAPI-Template-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run a FastAPI app on Paperspace

Intro

This is a template for users looking to deploy their own FastAPI app on Paperspace.

Project Structure

├── Dockerfile
├── requirements.txt
├── paperspace.yaml
├── app
    ├── main.py

Develop locally

  • Install the Paperspace CLI curl -fsSL https://paperspace.com/install.sh | sh
  • Initialize the app pspace init paperspace-fastapi -t Paperspace/FastAPI-Template-App. This will create an app locally, clone this GitHub repo as your app template, and remotely link your app to Paperspace so you can add secrets and collaborators.
  • Make updates to your application (e.g. application files, Dockerfile, requirements.txt)
  • Build a new image by running docker build -t my-image:tag .
  • Push image to the container registry of your choice by running docker push my-image:tag
  • Update the app config at paperspace.yaml with the location of your new image
  • Deploy your application on Paperspace by running pspace up.

How to deploy

  • Install the Paperspace CLI curl -fsSL https://paperspace.com/install.sh | sh
  • Run pspace up to deploy your app on Paperspace. This will send the app config at [paperspace.yaml)(paperspace.yaml) to Paperspace, which will spin up your application.
  • Once the application is in a ready state, you can send a request to the base endpoint using the application URL provided in the Paperspace dashboard or outputted from the pspace up CLI command.

Simplify your deployment workflow with GitHub Actions

Use the Paperspace Deploy Action to integrate a build/push process into your CI/CD pipeline.

Documentation

Learn more about Paperspace apps at our documentation site.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published