Skip to main content
The generated application includes an image block for the workspace Devin sees in a new session. Customize that block with the normal modal.Image API.

Before you begin

You need a deployed modal-devin application from Create an outpost.
1

Open the generated outpost file

Find this block in outposts/my_outpost.py:
2

Install workspace tools

Add packages before prepare_image():
3

Add a repository

The default workspace is /root/workspace:
4

Set environment variables

Add non-secret configuration to the image:
Keep credentials out of image environment variables. Attach a Modal Secret to the function that needs it.
5

Deploy the changes

New sessions use the new image. A resumed session continues from its preserved filesystem instead of merging in later image changes.
Keep every image build operation before prepare_image() and leave the generated image wiring unchanged elsewhere in the application.

Optional tools

Choose the Python version or disable Chrome and FFmpeg when the workload does not need them:
See the image reference for everything else the standard image includes.