Skip to content

pythonExtension and python runtime improvements #1734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from 10 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
461 changes: 9 additions & 452 deletions docs/config/config-file.mdx

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions docs/config/extensions/additionalFiles.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: "Additional Files"
sidebarTitle: "additionalFiles"
description: "Use the additionalFiles build extension to copy additional files to the build directory"
---

Import the `additionalFiles` build extension and use it in your `trigger.config.ts` file:

```ts
import { defineConfig } from "@trigger.dev/sdk/v3";
import { additionalFiles } from "@trigger.dev/build/extensions/core";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
extensions: [
additionalFiles({ files: ["wrangler/wrangler.toml", "./assets/**", "./fonts/**"] }),
],
},
});
```

This will copy the files specified in the `files` array to the build directory. The `files` array can contain globs. The output paths will match the path of the file, relative to the root of the project.

This extension effects both the `dev` and the `deploy` commands, and the resulting paths will be the same for both.

<Note>The root of the project is the directory that contains the trigger.config.ts file</Note>
36 changes: 36 additions & 0 deletions docs/config/extensions/additionalPackages.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Additional Packages"
sidebarTitle: "additionalPackages"
description: "Use the additionalPackages build extension to include additional packages in the build"
---

Import the `additionalPackages` build extension and use it in your `trigger.config.ts` file:

```ts
import { defineConfig } from "@trigger.dev/sdk/v3";
import { additionalPackages } from "@trigger.dev/build/extensions/core";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
extensions: [additionalPackages({ packages: ["wrangler"] })],
},
});
```

This allows you to include additional packages in the build that are not automatically included via imports. This is useful if you want to install a package that includes a CLI tool that you want to invoke in your tasks via `exec`. We will try to automatically resolve the version of the package but you can specify the version by using the `@` symbol:

```ts
import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
extensions: [additionalPackages({ packages: ["wrangler@1.19.0"] })],
},
});
```

This extension does not do anything in `dev` mode, but it will install the packages in the build directory when you run `deploy`. The packages will be installed in the `node_modules` directory in the build directory.
34 changes: 34 additions & 0 deletions docs/config/extensions/aptGet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "apt-get"
sidebarTitle: "aptGet"
description: "Use the aptGet build extension to install system packages into the deployed image"
---

You can install system packages into the deployed image using the `aptGet` extension:

```ts
import { defineConfig } from "@trigger.dev/sdk/v3";
import { aptGet } from "@trigger.dev/build/extensions/core";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
extensions: [aptGet({ packages: ["ffmpeg"] })],
},
});
```

If you want to install a specific version of a package, you can specify the version like this:

```ts
import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
extensions: [aptGet({ packages: ["ffmpeg=6.0-4"] })],
},
});
```
20 changes: 20 additions & 0 deletions docs/config/extensions/audioWaveform.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "Audio Waveform"
sidebarTitle: "audioWaveform"
description: "Use the audioWaveform build extension to add support for Audio Waveform in your project"
---

Previously, we installed [Audio Waveform](https://github.com/bbc/audiowaveform) in the build image. That's been moved to a build extension:

```ts
import { defineConfig } from "@trigger.dev/sdk/v3";
import { audioWaveform } from "@trigger.dev/build/extensions/audioWaveform";

export default defineConfig({
project: "<project ref>",
// Your other config settings...
build: {
extensions: [audioWaveform()], // uses verson 1.1.0 of audiowaveform by default
},
});
```
Loading