Skip to content

Commit 40fb341

Browse files
authored
docs: Sync pixi-pack docs with PR #104 (add --use-cache) (#3189)
1 parent 478a540 commit 40fb341

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/advanced/production_deployment.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,23 @@ pixi-pack pack --inject local-package-1.0.0-hbefa133_0.conda --manifest-pack pix
135135

136136
This can be particularly useful if you build the project itself and want to include the built package in the environment but still want to use `pixi.lock` from the project.
137137

138+
### Cache downloaded packages
139+
140+
You can cache downloaded packages to speed up subsequent pack operations by using the `--use-cache` flag:
141+
142+
```bash
143+
pixi-pack pack --use-cache ~/.pixi-pack/cache
144+
```
145+
146+
This will store all downloaded packages in the specified directory and reuse them in future pack operations. The cache follows the same structure as conda channels, organizing packages by platform subdirectories (e.g., linux-64, win-64, etc.).
147+
148+
Using a cache is particularly useful when:
149+
150+
- Creating multiple packs with overlapping dependencies
151+
- Working with large packages that take time to download
152+
- Operating in environments with limited bandwidth
153+
- Running CI/CD pipelines where package caching can significantly improve build times
154+
138155
### Unpacking without pixi-pack
139156

140157
If you don't have `pixi-pack` available on your target system, you can still install the environment if you have `conda` or `micromamba` available.

0 commit comments

Comments
 (0)