Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion flash/apps/build-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ This is the structure of the project template created by `flash init`:
<Tree.File name="gpu_worker.py" />
<Tree.File name="cpu_worker.py" />
<Tree.File name=".env.example" />
<Tree.File name=".flashignore" />
<Tree.File name=".gitignore" />
<Tree.File name="pyproject.toml" />
<Tree.File name="requirements.txt" />
Expand Down
2 changes: 1 addition & 1 deletion flash/apps/deploy-apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Each endpoint maintains its own connection to the state manager, querying for pe
If the build process can't find your endpoint functions:

- Ensure functions are decorated with `@Endpoint(...)`.
- Check that Python files aren't excluded by `.gitignore` or `.flashignore`.
- Check that Python files aren't excluded by `.gitignore` or Flash's [built-in ignore patterns](/flash/cli/build#built-in-ignore-patterns).
- Verify decorator syntax is correct.

### Deployment size limit exceeded
Expand Down
3 changes: 0 additions & 3 deletions flash/apps/initialize-project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ uv run flash init .
<Tree.File name="gpu_worker.py" />
<Tree.File name="cpu_worker.py" />
<Tree.File name=".env.example" />
<Tree.File name=".flashignore" />
<Tree.File name=".gitignore" />
<Tree.File name="pyproject.toml" />
<Tree.File name="requirements.txt" />
Expand All @@ -57,8 +56,6 @@ uv run flash init .

**cpu_worker.py**: An example CPU queue-based worker. Contains `@Endpoint` functions that run on CPU-only instances. Provides `/runsync` route for job submission. Creates one endpoint when deployed.

**.flashignore**: Lists files and directories to exclude from the deployment artifact (similar to `.gitignore`).

Each worker file defines a resource configuration and its associated functions. When you deploy, Flash creates one Serverless endpoint per unique resource configuration.

## Set up the project
Expand Down
19 changes: 19 additions & 0 deletions flash/cli/build.mdx
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Line 82)

Citation: Deprecation note based on the PR description: "Add deprecation warning for users who still have a .flashignore file, guiding them to migrate custom patterns to .gitignore."
View source

Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ Comma-separated list of packages to exclude from the build (e.g., `torch,torchvi
5. **Dependency installation**: Installs Python packages for Linux x86_64.
6. **Packaging**: Bundles everything into `.flash/artifact.tar.gz`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: Built-in ignore patterns extracted from the new always_ignore list in src/runpod_flash/cli/utils/ignore.py. The PR adds these patterns to replace the .flashignore file.
View source

## Built-in ignore patterns

Flash automatically excludes certain files and directories from deployment artifacts. These patterns cover common development files that shouldn't be deployed to production.

| Category | Patterns |
|----------|----------|
| Build artifacts | `.build/`, `.flash/`, `.runpod/`, `*.tar.gz`, `.git/`, `__pycache__/`, `*.pyc`, `*.pyo`, `*.pyd`, `*.egg-info/`, `dist/`, `build/` |
| Virtual environments | `.venv/`, `venv/`, `env/` |
| IDE files | `.vscode/`, `.idea/` |
| Environment files | `.env`, `.env.local` |
| Tests | `tests/`, `test_*.py`, `*_test.py` |
| Documentation | `docs/`, `*.md` (except `README.md`) |

Flash also respects your `.gitignore` file and excludes any files matching those patterns.

<Tip>
If you use other environment file variants like `.env.dev` or `.env.staging`, add them to your `.gitignore` to exclude them from deployment artifacts.
</Tip>

## Build artifacts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: QA report notes: "No pattern for .env.* wildcard (only .env and .env.local are excluded; .env.dev, .env.staging etc. would be included). Users should add these to .gitignore if needed."
View source

After running `flash build`:
Expand Down
1 change: 0 additions & 1 deletion flash/cli/init.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ The command creates the following project structure:
<Tree.File name="gpu_worker.py" />
<Tree.File name="cpu_worker.py" />
<Tree.File name=".env.example" />
<Tree.File name=".flashignore" />
<Tree.File name=".gitignore" />
<Tree.File name="pyproject.toml" />
<Tree.File name="requirements.txt" />
Expand Down
2 changes: 1 addition & 1 deletion flash/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Tarball exceeds maximum size. File size: 1.6GB, Max: 1.5GB
**Solution:**

1. Check for large files that shouldn't be included (datasets, model weights, logs).
2. Add large files to `.flashignore` to exclude them from the build.
2. Add large files to `.gitignore` to exclude them from the build.
3. Use [network volumes](/flash/configuration/storage) to store large models instead of bundling them.

### Invalid tarball format
Expand Down
Loading