Serverless cloud infrastructure for AI workloads. Run Python functions on GPUs with sub-second cold starts. v1.0 released May 2025 with multiple breaking API changes. Rapid release cadence — multiple versions per week.
pip install modalVerified import paths — ran on the pinned version, not inferred.
Deploy a GPU function to Modal. Run with: modal run script.py
Replace all modal.Stub() with modal.App().
Use Image.add_local_file() or Image.add_local_dir() instead of modal.Mount.
Explicitly add local dependencies with Image.add_local_python_source('your_module').Find-and-replace all three parameter names in function decorators.
Use modal.Volume to store model weights instead. Mount the Volume to the framework's cache directory.
Use Image.add_local_dir() / Image.add_local_file(). Pass copy=True if subsequent build steps need the files.
Replace @modal.web_endpoint() with @modal.fastapi_endpoint().
Pin to a stable release in production: pip install modal==1.3.3. Avoid pip install modal --pre in automated environments.
Do not use modal.Dict for persistent storage. Use modal.Volume for data that must survive beyond 7 days of inactivity.
It is recommended to use a virtual environment for pip operations or run pip as a non-root user. To update pip, run 'pip install --upgrade pip'.
Use `python -m modal` instead of `modal` for CLI commands, or reconfigure your system's environment variables to include the Python package executables in your PATH.
Replace all instances of `modal.Stub()` with `modal.App()` in your code.
Ensure you are importing the correct library as `import modal` (for Modal Labs) and not `from modAL.models import ActiveLearner` or similar, which belongs to the `modAL` library. If you intend to use Modal Labs, ensure you have installed `modal-client` (or `modal`) and not `modAL-python`.
Add your local Python package to your Modal image using `image.add_local_python_package('your_local_package_path')` or `image.add_local_python_source('your_local_source_directory')`.While Modal is investigating a root cause fix, you can try re-running your job, as this might be a transient issue. Ensure your Modal Image has the necessary CUDA versions and drivers if you are building a custom image.