repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: 'Modal.com' |
| #3 | description: 'Deploy your RAG application to modal.com platform' |
| #4 | --- |
| #5 | |
| #6 | Embedchain has a nice and simple abstraction on top of the [Modal.com](https://modal.com/) tools to let developers deploy RAG application to modal.com platform seamlessly. |
| #7 | |
| #8 | Follow the instructions given below to deploy your first application quickly: |
| #9 | |
| #10 | |
| #11 | ## Step-1 Create RAG application: |
| #12 | |
| #13 | We provide a command line utility called `ec` in embedchain that inherits the template for `modal.com` platform and help you deploy the app. Follow the instructions to create a modal.com app using the template provided: |
| #14 | |
| #15 | |
| #16 | ```bash Create application |
| #17 | pip install embedchain[modal] |
| #18 | mkdir my-rag-app |
| #19 | ec create --template=modal.com |
| #20 | ``` |
| #21 | |
| #22 | This `create` command will open a browser window and ask you to login to your modal.com account and will generate a directory structure like this: |
| #23 | |
| #24 | ```bash |
| #25 | ├── app.py |
| #26 | ├── .env |
| #27 | ├── .env.example |
| #28 | ├── embedchain.json |
| #29 | └── requirements.txt |
| #30 | ``` |
| #31 | |
| #32 | Feel free to edit the files as required. |
| #33 | - `app.py`: Contains API app code |
| #34 | - `.env`: Contains environment variables for production |
| #35 | - `.env.example`: Contains dummy environment variables (can ignore this file) |
| #36 | - `embedchain.json`: Contains embedchain specific configuration for deployment (you don't need to configure this) |
| #37 | - `requirements.txt`: Contains python dependencies for your FastAPI application |
| #38 | |
| #39 | ## Step-2: Test app locally |
| #40 | |
| #41 | You can run the app locally by simply doing: |
| #42 | |
| #43 | ```bash Run locally |
| #44 | pip install -r requirements.txt |
| #45 | ec dev |
| #46 | ``` |
| #47 | |
| #48 | ## Step-3: Deploy to modal.com |
| #49 | |
| #50 | You can deploy to modal.com using the following command: |
| #51 | ```bash Deploy app |
| #52 | ec deploy |
| #53 | ``` |
| #54 | |
| #55 | Once this step finished, it will provide you with the deployment endpoint where you can access the app live. It will look something like this (Swagger docs): |
| #56 | |
| #57 | <img src="/images/fly_io.png" /> |
| #58 | |
| #59 | ## Seeking help? |
| #60 | |
| #61 | If you run into issues with deployment, please feel free to reach out to us via any of the following methods: |
| #62 | |
| #63 | <Snippet file="get-help.mdx" /> |
| #64 |