Spaces:
Running
Running
π 24/7 Free Cloud Deployment Guide
This guide details how to host both the Static Technical Docs Hub and the Full Interactive Gateway (Playground & APIs) online 24/7 completely for free ($0 cost).
π¨ Part 1: Host Static Docs Hub on GitHub Pages (24/7 Free)
Since our Academic & Technical documentation hub (docs/index.html) is completely self-contained with client-side interactive cascade simulators and LaTeX math formulas, it runs perfectly on GitHub Pages:
Step-by-Step GitHub Pages Setup:
- Push your code: Ensure the latest commit containing the
docs/index.htmlfile is pushed to your GitHub repository (e.g.github.com/ypeng12/InferRoute). - Open Repository Settings: Go to your GitHub repository webpage and click the Settings tab.
- Navigate to Pages: In the left sidebar under the "Code and automation" section, click Pages.
- Configure Build Source:
- Under Build and deployment β Source, select Deploy from a branch.
- Under Branch, select
main(or your default branch) and change the folder dropdown from/ (root)to/docs.
- Save Configuration: Click Save.
- Access Public URL: GitHub will compile and launch the page in 1β2 minutes. Your docs hub will be permanently online at:
https://ypeng12.github.io/InferRoute/
π§ Part 2: Host Full Gateway Server on Hugging Face Spaces (24/7 Free)
Hugging Face Spaces allows you to host Dockerized Python web servers 24/7 for free. It automatically builds the application from our root Dockerfile and serves it securely.
Step-by-Step Hugging Face Setup:
- Create Space: Go to Hugging Face Spaces and click Create new Space.
- Configure Space settings:
- Space Name: e.g.,
InferRouteorinferroute-gateway. - License: Choose
MITor open source. - SDK: Select Docker (very important).
- Docker Template: Select Blank (do not select Gradio/Streamlit).
- Space Hardware: Choose CPU Basic (Free - 16GB RAM).
- Visibility: Set to Public.
- Space Name: e.g.,
- Upload Files:
- Git clone the Space repository or upload the files directly using the Hugging Face web UI.
- Upload the following files/directories to the Space repository:
inferroute/(complete folder)docs/(complete folder)benchmarks/(complete folder)requirements.txtDockerfile
- Automatic Build: Once files are uploaded, Hugging Face automatically detects the
Dockerfile, compiles the dependencies, and deploys the gateway on port7860. - Enjoy Live Playground: Your gateway and interactive playground will be online 24/7 at:
https://huggingface.co/spaces/<your-username>/<your-space-name>
β‘ Part 3: Alternative - Host Gateway on Render (Free Tier)
Render.com provides free container hosting with automatic GitHub integration:
- Connect GitHub: Log in to Render and click New β Web Service.
- Select Repository: Connect your GitHub repository.
- Configure Environment:
- Runtime: Select Docker.
- Instance Type: Select Free.
- Environment Variables: Under the "Advanced" tab, add variables if you want to override default credentials (e.g. custom API keys).
- Deploy: Render will build the container from the
Dockerfileand expose it. (Note: Free tier Render instances go to sleep after 15 minutes of inactivity. Hugging Face Spaces is recommended for persistent 24/7 uptimes).