dxlorhuggingface commited on
Commit
1ad2189
Β·
verified Β·
1 Parent(s): 545336c

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -54
README.md DELETED
@@ -1,54 +0,0 @@
1
- # Run a FastAPI app with a Hugging Face model on Paperspace
2
-
3
- ## Intro
4
-
5
- This is a template for users looking to deploy their own FastAPI app with a Hugging Face model on Paperspace.
6
-
7
- - The [FastAPI](https://fastapi.tiangolo.com/lo/) app code is located in `app/main.py`
8
- - The Dockerfile is used to create an image which was pushed as a public image to [paperspace/fastapi-hf-template-app:2023-06-20](https://hub.docker.com/repository/docker/paperspace/fastapi-hf-template-app)
9
- - The above image can be deployed to Paperspace using the [app config](https://docs-next.paperspace.com/deploying/app-config) located at `paperspace.yaml`
10
-
11
- ## Project Structure
12
-
13
- ```
14
- β”œβ”€β”€ Dockerfile
15
- β”œβ”€β”€ requirements.txt
16
- β”œβ”€β”€ paperspace.yaml
17
- β”œβ”€β”€ app
18
- β”œβ”€β”€ main.py
19
- ```
20
-
21
- ## Develop locally
22
-
23
- - Install the [Paperspace CLI](https://docs-next.paperspace.com/cli) `curl -fsSL https://paperspace.com/install.sh | sh`
24
- - Initialize the app `pspace init paperspace-hf -t Paperspace/FastAPI-Hugging-Face-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](https://docs-next.paperspace.com/secrets) and collaborators.
25
- - Make updates to your application (e.g. application files, Dockerfile, requirements.txt)
26
- - Change the Hugging Face model used in the app
27
- - Build a new image by running `docker build -t my-image:tag .`
28
- - Push image to the container registry of your choice by running `docker push my-image:tag`
29
- - Update the app config at `paperspace.yaml` with the location of your new image
30
- - Update the app config with your choice of Hugging Face model. When using integrations, mounts will be located at /opt/integrations/<name>
31
- - Deploy your application on Paperspace by running [`pspace up`](https://docs-next.paperspace.com/cli/up). Ensure you have the [Paperspace CLI](https://github.com/Paperspace/cli#installation) installed.
32
-
33
- ## How to deploy
34
-
35
- - Install the [Paperspace CLI](https://docs-next.paperspace.com/cli) `curl -fsSL https://paperspace.com/install.sh | sh`
36
- - Run [`pspace up`](https://docs-next.paperspace.com/cli/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.
37
- - Once the application is in a ready state, you can send a translation request to the endpoint using the application URL:
38
- `curl -X GET '<application-url>/translate?text_input=Hello+world!'`
39
-
40
- ## Simplify your deployment workflow with GitHub Actions
41
-
42
- Use the [Paperspace Deploy Action](https://github.com/Paperspace/deploy-action) to integrate a build/push process into your CI/CD pipeline.
43
-
44
- ## Benefits of Hugging Face integrations
45
-
46
- Hugging Face integrations are a simple way to integrate Hugging Face models into your application while improving start time performance for auto-scaling and production level applications.
47
-
48
- A Hugging Face integration happens once at the beginning of each new application deployment (i.e. each app config update). A temporary volume is created, the Hugging Face repo is then cloned into that volume, and that volume is then mounted to your container on startup at `/opt/integrations/<integration-name>`. Any new replicas that are spun up due to auto-scaling will also have the volume mounted to the same path, without having to go through the repo cloning process again, which shortens startup times for each subsequent replica spin up. Learn more about integrations in the [Paperspace docs](https://docs-next.paperspace.com/).
49
-
50
-
51
-
52
- ## Documentation
53
-
54
- Learn more about Paperspace apps at our [documentation site](https://docs-next.paperspace.com/apps).