Examples
Build and deploy a Flash app from the current directory (auto-selects environment if only one exists):Flags
Target environment name (e.g.,
dev, staging, production). Auto-selected if only one exists. Creates the environment if it doesn’t exist.Flash app name. Auto-detected from the current directory if not specified.
--no-deps
Skip transitive dependencies during pip install. Useful when the base image already includes dependencies.
Comma-separated packages to exclude (e.g.,
torch,torchvision). Use this to stay under the 1.5GB deployment limit.Custom archive name for the build artifact.
--preview
Build and launch a local Docker-based preview environment instead of deploying to Runpod.
What happens during deployment
- Build phase: Creates the deployment artifact (same as
flash build). - Environment resolution: Detects or creates the target environment.
- Upload: Sends the artifact to Runpod storage.
- Provisioning: Creates or updates Serverless endpoints.
- Configuration: Sets up environment variables and service discovery.
Architecture
After deployment, your Flash app runs as independent Serverless endpoints on Runpod: Each resource configuration in your code creates an independent endpoint. You can call any endpoint directly based on your needs.App and environment management
Automatic creation
Flash automatically creates apps and environments as needed during deployment:- If the app doesn’t exist, Flash creates it along with the target environment.
- If only the environment doesn’t exist, Flash creates it within the existing app.
Auto-selection
When you have only one environment, it’s selected automatically:Default environment
If no app or environment exists and none is specified, Flash creates the app with aproduction environment by default.
Post-deployment
After successful deployment, Flash displays all deployed endpoints:Authentication
All deployed endpoints require authentication with your Runpod API key:Preview mode
Test locally before deploying:- Each endpoint runs in its own container.
- All containers communicate via Docker network.
- Endpoints exposed on local ports for testing.
- Press
Ctrl+Cto stop.
Managing deployment size
Runpod Serverless has a 1.5GB limit. Flash automatically excludes packages that are pre-installed in the base image (torch, torchvision, torchaudio, numpy, triton).
If the deployment is still too large, use --exclude to skip additional packages:
flash build - Managing deployment size for more details.
flash run vs flash deploy
Seeflash run for a detailed comparison of local development vs production deployment.
Troubleshooting
Multiple environments error
Deployment size limit
Base image packages are auto-excluded. If the deployment is still too large, use--exclude to skip additional packages:
Authentication fails
Ensure your API key is set:Related commands
flash build- Build without deployingflash run- Local development serverflash env- Manage environmentsflash app- Manage applicationsflash undeploy- Remove endpoints